/**
 * Forms Styles - RGPD Consent & Messages
 * RetroDuel - Frontend
 */

/* ============================================
   CONSENT CHECKBOX STYLES
   ============================================ */

.newsletter-consent,
.consent-group {
    margin-top: 15px;
    margin-bottom: 15px;
}

.consent-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.9em;
    line-height: 1.5;
    color: #d1d5db;
    cursor: pointer;
    transition: color 0.3s ease;
}

.consent-label:hover {
    color: #ffffff;
}

.consent-label input[type="checkbox"] {
    flex-shrink: 0;
    margin-top: 3px;
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #a78bfa;
}

.consent-label span {
    flex: 1;
}

.consent-label a {
    color: #a78bfa;
    text-decoration: underline;
    transition: color 0.3s ease;
}

.consent-label a:hover {
    color: #c4b5fd;
}

.consent-info {
    font-size: 0.85em;
    color: #9ca3af;
    margin-top: 10px;
    line-height: 1.4;
}

/* ============================================
   NEWSLETTER FORM - Consent specific
   ============================================ */

.newsletter-consent {
    max-width: 600px;
    margin: 15px auto 0;
    padding: 15px;
    background: rgba(167, 139, 250, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(167, 139, 250, 0.2);
}

.newsletter-consent .consent-label {
    font-size: 0.85em;
    text-align: left;
}

/* ============================================
   JOIN FORM - Consent specific
   ============================================ */

.join-form .consent-group {
    padding: 20px;
    background: rgba(167, 139, 250, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(167, 139, 250, 0.2);
}

/* ============================================
   FORM MESSAGES (Success/Error)
   ============================================ */

.form-message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 8px;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 500;
    font-size: 16px;
    z-index: 10000;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    max-width: 400px;
}

.form-message-success {
    background: linear-gradient(135deg, #00ff88 0%, #00cc66 100%);
    color: #001a0d;
}

.form-message-error {
    background: linear-gradient(135deg, #ff3366 0%, #cc0033 100%);
    color: #ffffff;
}

.form-message-info {
    background: linear-gradient(135deg, #6a5acd 0%, #483d8b 100%);
    color: #ffffff;
}

/* ============================================
   BUTTON LOADING STATE
   ============================================ */

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    position: relative;
}

.btn-submit:disabled::after {
    content: '';
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: translateY(-50%) rotate(360deg);
    }
}

/* ============================================
   RESPONSIVE - Mobile
   ============================================ */

@media (max-width: 768px) {
    .form-message {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
        font-size: 14px;
        padding: 12px 20px;
    }

    .consent-label {
        font-size: 0.85em;
    }

    .newsletter-consent {
        padding: 12px;
    }

    .join-form .consent-group {
        padding: 15px;
    }
}

/* ============================================
   CHECKBOX CUSTOM STYLING (Enhanced)
   ============================================ */

/* Modern checkbox styling */
.consent-label input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid #a78bfa;
    border-radius: 4px;
    background: transparent;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
}

.consent-label input[type="checkbox"]:hover {
    border-color: #c4b5fd;
    background: rgba(167, 139, 250, 0.1);
}

.consent-label input[type="checkbox"]:checked {
    background: linear-gradient(135deg, #a78bfa 0%, #8b5cf6 100%);
    border-color: #a78bfa;
}

.consent-label input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #ffffff;
    font-size: 14px;
    font-weight: bold;
}

.consent-label input[type="checkbox"]:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.3);
}

/* ============================================
   CHARACTER COUNTER
   ============================================ */

.char-counter {
    text-align: right;
    font-size: 0.85em;
    color: #9ca3af;
    margin-top: 5px;
    font-family: 'Rajdhani', sans-serif;
}

.char-counter #charCount {
    font-weight: 600;
    transition: color 0.3s ease;
}
