/**
 * Popup Hodnotenie - Frontend Styles
 * Compact version
 */

/* CSS Custom Properties (fallback values) */
:root {
    --popup-hodnotenie-primary: #0073aa;
    --popup-hodnotenie-background: #ffffff;
    --popup-hodnotenie-text: #333333;
    --popup-hodnotenie-star: #ffb900;
}

/* Base popup styles */
.popup-hodnotenie {
    position: fixed;
    z-index: 999999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    font-size: 13px;
    line-height: 1.4;
    box-sizing: border-box;
}

.popup-hodnotenie *,
.popup-hodnotenie *::before,
.popup-hodnotenie *::after {
    box-sizing: inherit;
}

.popup-hodnotenie.is-visible {
    opacity: 1;
    visibility: visible;
}

/* Overlay for center position */
.popup-hodnotenie-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
}

/* Position variations */
.popup-hodnotenie[data-position="bottom-right"] {
    bottom: 15px;
    right: 15px;
}

.popup-hodnotenie[data-position="bottom-left"] {
    bottom: 15px;
    left: 15px;
}

.popup-hodnotenie[data-position="center"] .popup-hodnotenie-overlay {
    display: flex;
}

/* Content wrapper */
.popup-hodnotenie-content {
    background: var(--popup-hodnotenie-background);
    color: var(--popup-hodnotenie-text);
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    max-width: 280px;
    width: 100%;
    position: relative;
    outline: none;
}

.popup-hodnotenie[data-position="center"] .popup-hodnotenie-content {
    max-width: 300px;
}

/* Inner container */
.popup-hodnotenie-inner {
    padding: 16px;
}

/* Close button */
.popup-hodnotenie-close {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 24px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 18px;
    color: var(--popup-hodnotenie-text);
    opacity: 0.4;
    transition: opacity 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    padding: 0;
    line-height: 1;
}

.popup-hodnotenie-close:hover,
.popup-hodnotenie-close:focus {
    opacity: 1;
    background: rgba(0, 0, 0, 0.05);
}

/* Question text */
.popup-hodnotenie-question {
    font-size: 14px;
    font-weight: 600;
    line-height: normal;
    margin: 0 0 12px;
    padding-right: 20px;
    color: var(--popup-hodnotenie-text);
    text-align: center;
}

/* Star rating */
.popup-hodnotenie-stars {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin-bottom: 12px;
}

.popup-hodnotenie-star {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 24px;
    padding: 2px;
    color: #ddd;
    transition: color 0.15s ease, transform 0.15s ease;
    line-height: 1;
}

.popup-hodnotenie-star:hover {
    transform: scale(1.15);
}

.popup-hodnotenie-star.is-active {
    color: var(--popup-hodnotenie-star);
}

/* Feedback textarea */
.popup-hodnotenie-feedback {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    resize: vertical;
    min-height: 60px;
    font-family: inherit;
    font-size: 13px;
    color: var(--popup-hodnotenie-text);
    background: #fff;
    margin-bottom: 12px;
    transition: border-color 0.2s ease;
}

.popup-hodnotenie-feedback:focus {
    outline: none;
    border-color: var(--popup-hodnotenie-primary);
}

.popup-hodnotenie-feedback::placeholder {
    color: #999;
    font-size: 12px;
}

/* Submit button */
.popup-hodnotenie-submit {
    width: 100%;
    padding: 10px 16px;
    background: var(--popup-hodnotenie-primary);
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, opacity 0.2s ease;
}

.popup-hodnotenie-submit:hover:not(:disabled) {
    filter: brightness(1.1);
}

.popup-hodnotenie-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Error message */
.popup-hodnotenie-error {
    background: #fee;
    color: #c00;
    padding: 8px 10px;
    border-radius: 4px;
    margin-bottom: 12px;
    font-size: 12px;
}

/* Thank you message */
.popup-hodnotenie-thank-you {
    text-align: center;
    padding: 10px 0;
}

.popup-hodnotenie-thank-you-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: #4caf50;
    color: #fff;
    border-radius: 50%;
    font-size: 24px;
    margin-bottom: 10px;
}

.popup-hodnotenie-thank-you p {
    margin: 0;
    font-size: 14px;
    color: var(--popup-hodnotenie-text);
}

/* Animation: Fade */
.popup-hodnotenie[data-animation="fade"] {
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* Animation: Slide */
.popup-hodnotenie[data-animation="slide"][data-position="bottom-right"],
.popup-hodnotenie[data-animation="slide"][data-position="bottom-left"] {
    transform: translateY(20px);
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
}

.popup-hodnotenie[data-animation="slide"][data-position="bottom-right"].is-visible,
.popup-hodnotenie[data-animation="slide"][data-position="bottom-left"].is-visible {
    transform: translateY(0);
}

.popup-hodnotenie[data-animation="slide"][data-position="center"] .popup-hodnotenie-content {
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.popup-hodnotenie[data-animation="slide"][data-position="center"].is-visible .popup-hodnotenie-content {
    transform: translateY(0);
}

/* Animation: None */
.popup-hodnotenie[data-animation="none"] {
    transition: none;
}

/* Hidden rating input */
.popup-hodnotenie-rating-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .popup-hodnotenie[data-position="bottom-right"],
    .popup-hodnotenie[data-position="bottom-left"] {
        left: 10px;
        right: 10px;
        bottom: 10px;
    }

    .popup-hodnotenie-content {
        max-width: none;
    }

    .popup-hodnotenie-inner {
        padding: 14px;
    }

    .popup-hodnotenie-question {
        font-size: 13px;
    }

    .popup-hodnotenie-star {
        font-size: 22px;
    }

    .popup-hodnotenie-stars {
        gap: 2px;
    }
}

/* Accessibility - reduced motion */
@media (prefers-reduced-motion: reduce) {
    .popup-hodnotenie,
    .popup-hodnotenie-content,
    .popup-hodnotenie-star {
        transition: none;
    }
}

/* Print - hide popup */
@media print {
    .popup-hodnotenie {
        display: none !important;
    }
}
