/**
 * Age Gate Styles
 *
 * @package ReviewPro
 */

:root {
    --age-gate-overlay-color: #000000;
    --age-gate-modal-bg: #ffffff;
    --age-gate-icon-bg: #2563eb;
    --age-gate-title-color: #1f2937;
    --age-gate-text-color: #6b7280;
    --age-gate-button-bg: #2563eb;
    --age-gate-button-bg-hover: #1d4ed8;
    --age-gate-button-text: #ffffff;
}

.reviewpro-age-gate {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000001; /* Above cookie banner (1000000) during verification */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    pointer-events: none; /* Allow cookie banner clicks to pass through */
}

.reviewpro-age-gate--blur ~ * {
    filter: blur(10px);
}

.reviewpro-age-gate__overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    background: var(--age-gate-overlay-rgba, rgba(0, 0, 0, 0.85));
    backdrop-filter: blur(5px);
    pointer-events: auto; /* Block all clicks while age gate active */
}

.reviewpro-age-gate__modal {
    position: relative;
    background: var(--age-gate-modal-bg, #ffffff);
    border-radius: 16px;
    max-width: 480px;
    width: 100%;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: reviewproAgeGateSlideIn 0.3s ease-out;
    pointer-events: auto; /* Re-enable clicks on the modal itself */
}

@keyframes reviewproAgeGateSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.reviewpro-age-gate__content {
    padding: 40px;
    text-align: center;
}

.reviewpro-age-gate__logo {
    margin-bottom: 24px;
}

.reviewpro-age-gate__logo img {
    max-height: 60px;
    width: auto;
}

.reviewpro-age-gate__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: var(--age-gate-icon-bg, #2563eb);
    background: linear-gradient(135deg, var(--age-gate-icon-bg, #2563eb) 0%, var(--age-gate-icon-bg-end, #1d4ed8) 100%);
    border-radius: 50%;
    margin-bottom: 24px;
    color: white;
}

.reviewpro-age-gate__title {
    font-size: 24px;
    font-weight: 700;
    color: var(--age-gate-title-color, #1f2937);
    margin: 0 0 12px;
}

.reviewpro-age-gate__message {
    font-size: 16px;
    color: var(--age-gate-text-color, #6b7280);
    margin: 0 0 32px;
    line-height: 1.6;
}

/* Button Method */
.reviewpro-age-gate__buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.reviewpro-age-gate__btn {
    display: block;
    width: 100%;
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.reviewpro-age-gate__btn--yes,
.reviewpro-age-gate__btn--submit {
    background: var(--age-gate-button-bg, #2563eb);
    color: var(--age-gate-button-text, #ffffff);
}

.reviewpro-age-gate__btn--yes:hover,
.reviewpro-age-gate__btn--submit:hover {
    background: var(--age-gate-button-bg-hover, #1d4ed8);
    transform: translateY(-1px);
}

.reviewpro-age-gate__btn--no {
    background: #f3f4f6;
    color: #6b7280;
}

.reviewpro-age-gate__btn--no:hover {
    background: #e5e7eb;
}

/* Birthdate Method */
.reviewpro-age-gate__form {
    text-align: left;
}

.reviewpro-age-gate__label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--age-gate-title-color, #374151);
    margin-bottom: 12px;
}

.reviewpro-age-gate__date-inputs {
    display: grid;
    grid-template-columns: 1fr 80px 100px;
    gap: 12px;
    margin-bottom: 20px;
}

.reviewpro-age-gate__select {
    padding: 12px 16px;
    font-size: 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    background: var(--age-gate-modal-bg, white);
    color: var(--age-gate-title-color, #1f2937);
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.reviewpro-age-gate__select:focus {
    outline: none;
    border-color: var(--age-gate-button-bg, #2563eb);
}

.reviewpro-age-gate__error {
    margin-top: 12px;
    padding: 12px;
    background: #fef2f2;
    border-radius: 8px;
    color: #dc2626;
    font-size: 14px;
}

.reviewpro-age-gate__disclaimer {
    margin-top: 24px;
    font-size: 12px;
    color: #9ca3af;
}

/* Loading state */
.reviewpro-age-gate__btn--loading {
    opacity: 0.7;
    pointer-events: none;
}

.reviewpro-age-gate__btn--loading::after {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-left: 8px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: reviewproSpin 0.6s linear infinite;
    vertical-align: middle;
}

@keyframes reviewproSpin {
    to {
        transform: rotate(360deg);
    }
}

/* Mobile */
@media (max-width: 480px) {
    .reviewpro-age-gate__content {
        padding: 30px 24px;
    }

    .reviewpro-age-gate__title {
        font-size: 20px;
    }

    .reviewpro-age-gate__date-inputs {
        grid-template-columns: 1fr;
    }

    .reviewpro-age-gate__icon {
        width: 64px;
        height: 64px;
    }

    .reviewpro-age-gate__icon svg {
        width: 32px;
        height: 32px;
    }
}

/* Hidden state */
.reviewpro-age-gate--hidden {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
