/**
 * WP Dynamic Survey - Popup Styles
 * Minimalist design based on design reference
 */

/* Overlay */
.wp-survey-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.65);
    z-index: 999998;
    animation: wpSurveyFadeIn 0.3s ease-out;
}

/* Popup Container - Centered */
.wp-survey-popup-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #ffffff;
    border-radius: 16px;
    padding: 24px 32px 24px;
    max-width: 500px;
    width: 92%;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.25);
    z-index: 999999;
    animation: wpSurveySlideUp 0.4s ease-out;
}

/* Animations */
@keyframes wpSurveyFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes wpSurveySlideUp {
    from {
        opacity: 0;
        transform: translate(-50%, -40%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

/* Close Button - Clean X Icon */
.wp-survey-popup-close {
    position: absolute;
    top: 24px;
    right: 24px;
    border: none;
    padding: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

.wp-survey-popup-close:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

.wp-survey-popup-close svg {
    width: 20px;
    height: 20px;
}

/* Content Area */
.wp-survey-popup-content {
    text-align: center;
}

/* Title - Bold & Clean */
.wp-survey-popup-title {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 12px 0;
    color: #1a1a1a;
    line-height: 1.25;
    letter-spacing: -0.03em;
}

/* Message - Light Description */
.wp-survey-popup-message {
    font-size: 16px;
    line-height: 1.5;
    color: #6b7280;
    margin: 0 0 32px 0;
    font-weight: 400;
    text-align: left;
}

/* Message HTML elements styling */
.wp-survey-popup-message p {
    margin: 0 0 12px 0;
}

.wp-survey-popup-message p:last-child {
    margin-bottom: 0;
}

.wp-survey-popup-message strong,
.wp-survey-popup-message b {
    font-weight: 600;
    color: #374151;
}

.wp-survey-popup-message em,
.wp-survey-popup-message i {
    font-style: italic;
}

.wp-survey-popup-message a {
    color: #0284c7;
    text-decoration: underline;
    transition: color 0.2s ease;
}

.wp-survey-popup-message a:hover {
    color: #0369a1;
}

.wp-survey-popup-message ul,
.wp-survey-popup-message ol {
    margin: 20px 0;
    padding-left: 0;
    list-style: none;
}

.wp-survey-popup-message li {
    margin-bottom: 14px;
    padding-left: 36px;
    position: relative;
    font-size: 16px;
    line-height: 1.6;
    text-align: left;
}

.wp-survey-popup-message li:last-child {
    margin-bottom: 0;
}

/* Green checkmark icon */
.wp-survey-popup-message ul li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 0;
    width: 24px;
    height: 24px;
    background: #10b981;
    color: #ffffff;
    border-radius: 50%;
    font-size: 14px;
    font-weight: 700;
    line-height: 24px;
    text-align: center;
}

/* Numbered lists styling */
.wp-survey-popup-message ol {
    counter-reset: item;
}

.wp-survey-popup-message ol li::before {
    content: counter(item);
    counter-increment: item;
    position: absolute;
    left: 0;
    top: 0;
    width: 24px;
    height: 24px;
    background: #10b981;
    color: #ffffff;
    border-radius: 50%;
    font-size: 13px;
    font-weight: 600;
    line-height: 24px;
}

/* CTA Button - Bold & Clear */
.wp-survey-popup-button {
    display: block;
    padding: 10px 31px;
    background: #0284c7;
    color: #ffffff !important;
    text-align: center;
    text-decoration: none !important;
    border-radius: 10px;
    font-weight: 600;
    font-size: 17px;
    transition: all 0.25s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(2, 132, 199, 0.15);
    margin: 0 auto 16px;
    max-width: fit-content;
}

.wp-survey-popup-button:hover {
    background: #0369a1;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(2, 132, 199, 0.25);
}

.wp-survey-popup-button:focus {
    border-color: none;
    background-color: none;
}

.wp-survey-popup-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(2, 132, 199, 0.2);
}

/* Don't Show Again Checkbox */
.wp-survey-popup-checkbox {
    text-align: center;
    margin: 0 0 20px 0;
}

.wp-survey-popup-checkbox label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #6b7280;
    transition: color 0.2s ease;
}

.wp-survey-popup-checkbox label:hover {
    color: #374151;
}

.wp-survey-popup-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #0284c7;
    margin: 0;
}

.wp-survey-popup-checkbox span {
    user-select: none;
    line-height: 1.4;
}

/* Footer Message */
.wp-survey-popup-footer-message {
    margin-top: 0;
    padding-top: 28px;
    text-align: left;
    font-size: 16px;
    color: #6b7280;
    line-height: 1.5;
    font-weight: 400;
}

/* Footer Message HTML elements styling */
.wp-survey-popup-footer-message p {
    margin: 0 0 10px 0;
}

.wp-survey-popup-footer-message p:last-child {
    margin-bottom: 0;
}

.wp-survey-popup-footer-message strong,
.wp-survey-popup-footer-message b {
    font-weight: 600;
    color: #374151;
}

.wp-survey-popup-footer-message em,
.wp-survey-popup-footer-message i {
    font-style: italic;
}

.wp-survey-popup-footer-message a {
    color: #0284c7;
    text-decoration: underline;
    transition: color 0.2s ease;
}

.wp-survey-popup-footer-message a:hover {
    color: #0369a1;
}

.wp-survey-popup-footer-message ul,
.wp-survey-popup-footer-message ol {
    margin: 12px 0;
    padding-left: 0;
    text-align: left;
    list-style: none;
}

.wp-survey-popup-footer-message li {
    margin-bottom: 12px;
    padding-left: 36px;
    position: relative;
    line-height: 1.6;
}

.wp-survey-popup-footer-message li:last-child {
    margin-bottom: 0;
}

/* Green checkmark icon for footer */
.wp-survey-popup-footer-message ul li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 0;
    width: 20px;
    height: 20px;
    background: #10b981;
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    line-height: 20px;
    text-align: center;
}

/* Numbered lists styling for footer */
.wp-survey-popup-footer-message ol {
    counter-reset: item;
}

.wp-survey-popup-footer-message ol li::before {
    content: counter(item);
    counter-increment: item;
    position: absolute;
    left: 0;
    top: 0;
    width: 20px;
    height: 20px;
    background: #10b981;
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    line-height: 20px;
    text-align: center;
}

.wp-survey-popup-footer-message h2,
.wp-survey-popup-footer-message h3,
.wp-survey-popup-footer-message h4 {
    margin: 12px 0 8px 0;
    font-weight: 600;
    color: #374151;
}

.wp-survey-popup-footer-message h2 {
    font-size: 18px;
}

.wp-survey-popup-footer-message h3 {
    font-size: 16px;
}

.wp-survey-popup-footer-message h4 {
    font-size: 15px;
}

/* Responsive Design */
@media (max-width: 640px) {
    .wp-survey-popup-container {
        padding: 36px 28px 32px;
        width: 94%;
        border-radius: 14px;
        max-width: none;
    }

    .wp-survey-popup-title {
        font-size: 24px;
        margin-bottom: 10px;
    }

    .wp-survey-popup-message {
        font-size: 15px;
        margin-bottom: 28px;
        line-height: 1.5;
    }

    .wp-survey-popup-button {
        padding: 16px 24px;
        font-size: 16px;
        border-radius: 8px;
    }

    .wp-survey-popup-close {
        top: 16px;
        right: 16px;
        width: 36px;
        height: 36px;
    }

    .wp-survey-popup-close svg {
        width: 18px;
        height: 18px;
    }

    .wp-survey-popup-footer-message {
        padding-top: 24px;
        font-size: 15px;
    }
}

/* Accessibility - Focus Styles */
.wp-survey-popup-close:focus,
.wp-survey-popup-button:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

/* Print Styles - Hide popup when printing */
@media print {
    .wp-survey-popup {
        display: none !important;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .wp-survey-popup-container {
        border: 2px solid #000;
    }

    .wp-survey-popup-button {
        border-width: 3px;
    }
}

/* Reduce Motion Support */
@media (prefers-reduced-motion: reduce) {
    .wp-survey-popup-overlay,
    .wp-survey-popup-container {
        animation: none;
    }

    .wp-survey-popup-close:hover {
        transform: none;
    }

    .wp-survey-popup-button:hover {
        transform: none;
    }
}
