/*
 * Parental Consent System Styles - RODO Art. 8 Compliant
 * Copyright (c) 2025 Fundacja na rzecz Hospicjum Maryi Królowej Apostołów w Krakowie
 */

/* Parental Consent Banner */
.parental-consent-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(8px);
    z-index: 20000; /* Higher than legal banner */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease-in-out;
    font-family: 'Comic Neue', 'Segoe UI', sans-serif;
}

.parental-consent-banner.show {
    opacity: 1;
    visibility: visible;
}

.parental-consent-banner.hide {
    opacity: 0;
    visibility: hidden;
}

.parental-consent-content {
    background: white;
    border-radius: 20px;
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 30px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    border: 4px solid #FF6B6B;
    animation: consent-appear 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes consent-appear {
    from {
        transform: scale(0.8) translateY(50px);
        opacity: 0;
    }
    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

/* Header */
.consent-header h2 {
    color: #FF6B6B;
    margin: 0 0 10px 0;
    font-size: 1.6rem;
    font-weight: 700;
    font-family: 'Comic Sans MS', 'Trebuchet MS', 'Segoe UI', system-ui, sans-serif;
    text-align: center;
}

.consent-header .subtitle {
    color: #666;
    font-size: 1rem;
    margin: 0 0 25px 0;
    text-align: center;
    font-weight: 600;
}

/* Body Content */
.consent-body {
    margin-bottom: 30px;
    line-height: 1.6;
}

.child-protection-notice {
    background: linear-gradient(135deg, #FFE5E5, #FFF0F0);
    padding: 20px;
    border-radius: 12px;
    border-left: 5px solid #FF6B6B;
    margin: 20px 0;
}

.child-protection-notice p {
    margin: 10px 0;
    font-weight: 500;
}

.parent-confirmation {
    margin: 25px 0;
}

.parent-confirmation h3 {
    color: #4A90FF;
    font-size: 1.3rem;
    margin: 0 0 15px 0;
    font-family: 'Comic Sans MS', 'Trebuchet MS', 'Segoe UI', system-ui, sans-serif;
}

.confirmation-points {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.confirmation-points li {
    padding: 12px 0;
    border-bottom: 1px solid #eee;
    font-weight: 500;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.confirmation-points li:last-child {
    border-bottom: none;
}

.legal-info {
    background: #F8F9FF;
    padding: 15px;
    border-radius: 10px;
    margin: 20px 0;
    border: 2px solid #E3F2FD;
}

.legal-info p {
    margin: 8px 0;
    font-size: 0.95rem;
}

.contact-info {
    background: #FFF8E1;
    padding: 15px;
    border-radius: 10px;
    margin: 20px 0;
    border: 2px solid #FFE082;
    font-size: 0.9rem;
}

/* Action Buttons */
.consent-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin: 25px 0 20px 0;
}

.consent-actions button {
    padding: 15px 20px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 3px solid transparent;
    font-family: 'Comic Sans MS', 'Trebuchet MS', 'Segoe UI', system-ui, sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-consent-grant {
    background: linear-gradient(135deg, #32D74B, #28B946);
    color: white;
    border-color: #32D74B;
    grid-column: span 2;
}

.btn-consent-grant:hover {
    background: linear-gradient(135deg, #28B946, #1FA83F);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(50, 215, 75, 0.4);
}

.btn-consent-deny {
    background: linear-gradient(135deg, #FF6B6B, #FF5252);
    color: white;
    border-color: #FF6B6B;
}

.btn-consent-deny:hover {
    background: linear-gradient(135deg, #FF5252, #FF4444);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(255, 107, 107, 0.4);
}

.btn-more-info {
    background: #4A90FF;
    color: white;
    border-color: #4A90FF;
}

.btn-more-info:hover {
    background: #357AE8;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(74, 144, 255, 0.3);
}

.btn-download {
    background: #AF52DE;
    color: white;
    border-color: #AF52DE;
}

.btn-download:hover {
    background: #9C27B0;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(175, 82, 222, 0.3);
}

.consent-actions button:focus {
    outline: 3px solid #FFCC00;
    outline-offset: 3px;
}

/* Adult Verification Form */
.adult-verification {
    background: linear-gradient(135deg, #E8F5E8, #F0F8FF);
    padding: 25px;
    border-radius: 15px;
    border: 3px solid #4A90FF;
    margin: 20px 0;
    display: none;
}

.adult-verification h3 {
    color: #4A90FF;
    margin: 0 0 20px 0;
    font-family: 'Comic Sans MS', 'Trebuchet MS', 'Segoe UI', system-ui, sans-serif;
    text-align: center;
}

.verification-step {
    margin: 20px 0;
    padding: 15px;
    background: white;
    border-radius: 10px;
    border: 2px solid #E3F2FD;
}

.verification-step label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
}

.verification-step input[type="email"],
.verification-step input[type="number"],
.verification-step select {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s;
}

.verification-step input:focus,
.verification-step select:focus {
    outline: none;
    border-color: #4A90FF;
    box-shadow: 0 0 0 3px rgba(74, 144, 255, 0.1);
}

.verification-step small {
    display: block;
    color: #666;
    font-size: 0.85rem;
    margin-top: 5px;
    font-style: italic;
}

.adult-question {
    border-color: #FF9500;
    background: #FFF8E1;
}

.adult-question #math-question {
    font-size: 1.2rem;
    font-weight: 700;
    color: #FF9500;
    margin: 10px 0;
    padding: 10px;
    background: white;
    border-radius: 8px;
    text-align: center;
    border: 2px solid #FF9500;
}

.verification-step label input[type="checkbox"] {
    width: auto;
    margin-right: 10px;
    transform: scale(1.2);
}

.btn-send-email {
    background: linear-gradient(135deg, #4A90FF, #357AE8);
    color: white;
    border-color: #4A90FF;
    grid-column: span 2;
}

.btn-send-email:hover {
    background: linear-gradient(135deg, #357AE8, #2E6DB5);
}

.btn-send-email:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* Access Denied */
.access-denied {
    background: linear-gradient(135deg, #FFEBEE, #FFCDD2);
    padding: 20px;
    border-radius: 12px;
    border: 3px solid #FF6B6B;
    text-align: center;
    margin-top: 20px;
}

.access-denied h3 {
    color: #FF6B6B;
    margin: 0 0 15px 0;
    font-family: 'Comic Sans MS', 'Trebuchet MS', 'Segoe UI', system-ui, sans-serif;
}

.access-denied p {
    margin: 10px 0;
    font-weight: 500;
}

/* Consent Confirmation */
.consent-confirmation {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border: 3px solid #32D74B;
    z-index: 25000;
    opacity: 0;
    transition: opacity 0.3s ease;
    text-align: center;
}

.consent-confirmation.show {
    opacity: 1;
}

.consent-confirmation h3 {
    color: #32D74B;
    margin: 0 0 15px 0;
    font-family: 'Comic Sans MS', 'Trebuchet MS', 'Segoe UI', system-ui, sans-serif;
}

.btn-ok {
    background: #32D74B;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 15px;
}

.btn-ok:hover {
    background: #28B946;
}

/* Email Sent & Error Popups */
.email-sent-popup,
.error-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    z-index: 30000;
    opacity: 0;
    transition: opacity 0.3s ease;
    max-width: 500px;
    width: 90%;
}

.email-sent-popup.show,
.error-popup.show {
    opacity: 1;
}

.email-sent-popup {
    border: 3px solid #32D74B;
}

.error-popup {
    border: 3px solid #FF6B6B;
}

.popup-content h3 {
    margin: 0 0 15px 0;
    font-family: 'Comic Sans MS', 'Trebuchet MS', 'Segoe UI', system-ui, sans-serif;
    text-align: center;
}

.email-sent-popup h3 {
    color: #32D74B;
}

.error-popup h3 {
    color: #FF6B6B;
}

.email-address {
    background: #F0F8FF;
    padding: 10px;
    border-radius: 8px;
    font-family: monospace;
    font-weight: bold;
    text-align: center;
    border: 2px solid #4A90FF;
    margin: 10px 0;
}

.test-verification {
    background: #FFF8E1;
    padding: 15px;
    border-radius: 8px;
    border: 2px dashed #FF9500;
}

.btn-test {
    background: #FF9500;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
}

.btn-test:hover {
    background: #E8850A;
}

/* Verified Consent Confirmation */
.consent-confirmation.verified {
    border-color: #32D74B;
}

.consent-confirmation.verified h3 {
    color: #32D74B;
}

.consent-confirmation.verified .confirmation-content {
    text-align: center;
}

.consent-confirmation.verified strong {
    color: #4A90FF;
}

/* Responsive Design */
@media (max-width: 768px) {
    .parental-consent-banner {
        padding: 10px;
    }
    
    .parental-consent-content {
        max-height: 95vh;
        padding: 20px;
        border-radius: 15px;
    }
    
    .consent-header h2 {
        font-size: 1.4rem;
    }
    
    .consent-actions {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .btn-consent-grant {
        grid-column: span 1;
    }
    
    .consent-actions button {
        padding: 12px 15px;
        font-size: 0.9rem;
    }
    
    .confirmation-points li {
        font-size: 0.9rem;
        padding: 10px 0;
    }
}

@media (max-width: 480px) {
    .parental-consent-content {
        padding: 15px;
        font-size: 0.9rem;
    }
    
    .consent-header h2 {
        font-size: 1.3rem;
    }
    
    .child-protection-notice,
    .legal-info,
    .contact-info {
        padding: 12px;
        font-size: 0.85rem;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .parental-consent-content {
        border-color: #000;
        border-width: 5px;
    }
    
    .child-protection-notice {
        background: #FFF;
        border-color: #000;
        border-width: 4px;
    }
    
    .consent-actions button {
        border-width: 4px;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .parental-consent-banner {
        transition: opacity 0.1s;
    }
    
    .parental-consent-content {
        animation: none;
    }
    
    .consent-actions button {
        transition: background-color 0.1s;
    }
    
    .consent-actions button:hover {
        transform: none;
        box-shadow: none;
    }
}
