/**
 * Just Play Age Gate - Styles
 */

/* Overlay */
.jpag-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.85);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease-in-out;
}

.jpag-overlay[aria-hidden='false'],
.jpag-overlay.jpag-active {
    opacity: 1;
    pointer-events: auto;
}

/* Modal */
.jpag-modal {
    background: white;
    border-radius: 16px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease-in-out;
}

.jpag-overlay.jpag-active .jpag-modal {
    transform: scale(1);
}

.jpag-modal-content {
    padding: 40px;
}

@media (max-width: 640px) {
    .jpag-modal-content {
        padding: 30px 20px;
    }
}

/* Title */
.jpag-title {
    font-size: 28px;
    font-weight: 700;
    color: #1e3a8a;
    margin: 0 0 20px 0;
    text-align: center;
    line-height: 1.3;
}

@media (max-width: 640px) {
    .jpag-title {
        font-size: 24px;
    }
}

/* Description */
.jpag-description {
    font-size: 16px;
    color: #4b5563;
    line-height: 1.6;
    margin: 0 0 30px 0;
    text-align: center;
}

@media (max-width: 640px) {
    .jpag-description {
        font-size: 14px;
    }
}

/* Form Section */
.jpag-form-section {
    margin-top: 30px;
}

.jpag-form-heading {
    font-size: 20px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 24px 0;
    text-align: center;
}

/* Form */
.jpag-form {
    width: 100%;
}

.jpag-form-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

@media (max-width: 480px) {
    .jpag-form-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

.jpag-form-field {
    display: flex;
    flex-direction: column;
}

.jpag-form-field label {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
    text-align: center;
}

.jpag-form-field select {
    padding: 12px 16px;
    font-size: 16px;
    font-weight: 600;
    color: #1e3a8a;
    background: white;
    border: 3px solid #fbbf24;
    border-radius: 8px;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%231e3a8a' d='M1.41 0L6 4.59 10.59 0 12 1.41l-6 6-6-6z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px;
    cursor: pointer;
    transition: border-color 0.2s ease;
    text-align: center;
}

.jpag-form-field select:hover {
    border-color: #f59e0b;
}

.jpag-form-field select:focus {
    outline: none;
    border-color: #f59e0b;
    box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.2);
}

/* Error Message */
.jpag-error-message {
    background: #fef2f2;
    border: 2px solid #ef4444;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 20px;
    color: #991b1b;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
}

/* Buttons */
.jpag-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-top: 24px;
}

@media (max-width: 480px) {
    .jpag-buttons {
        grid-template-columns: 1fr;
    }
}

.jpag-modal .jpag-button {
    padding: 16px 48px !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    border-radius: 10px !important;
    border: none !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    letter-spacing: 0.5px !important;
    text-transform: uppercase !important;
    display: inline-block !important;
}

.jpag-modal .jpag-button-decline {
    background: white !important;
    color: #9ca3af !important;
    border: 3px solid #e5e7eb !important;
}

.jpag-modal .jpag-button-decline:hover {
    background: #f9fafb !important;
    border-color: #d1d5db !important;
    color: #6b7280 !important;
}

.jpag-modal .jpag-button-accept {
    background: #c85a5a !important;
    color: white !important;
    box-shadow: 0 4px 12px rgba(200, 90, 90, 0.3) !important;
}

.jpag-modal .jpag-button-accept:hover {
    background: #b34f4f !important;
    box-shadow: 0 6px 16px rgba(200, 90, 90, 0.4) !important;
    transform: translateY(-1px) !important;
    color: white !important;
}

.jpag-button-accept:active,
.jpag-button-decline:active {
    transform: translateY(0);
}

/* Prevent body scroll when modal is open */
body:has(.jpag-overlay[aria-hidden='false']) {
    overflow: hidden;
}
