/* ============================================
   COOKIE CONSENT BANNER - GDPR/CCPA Compliant
   Compact, Modern Design
   ============================================ */

/* #296: floating bottom-right card instead of full-width bottom strip.
   The full-width bar was covering CTAs on the landing page that sit
   near the bottom of the viewport (e.g. "Enlist Today"). A bounded
   card on the right side keeps the cookie controls visible without
   blocking the page's primary conversion paths. */
.cookie-consent-banner {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    left: auto;
    max-width: 340px;
    background: linear-gradient(135deg, #0d0d0d 0%, #1a1a1a 100%);
    border: 1px solid var(--yellow-primary, #FFD700);
    border-radius: 10px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5), 0 0 18px rgba(255, 215, 0, 0.15);
    z-index: 9998;
    padding: 0.5rem 0;
    transform: translateY(calc(100% + 2rem));
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.cookie-consent-banner.show {
    transform: translateY(0);
}

.cookie-consent-content {
    padding: 0.5rem 0.9rem;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
}

/* Mobile: drop the corner offset and span full width with a small inset */
@media (max-width: 575px) {
    .cookie-consent-banner {
        right: 0.75rem;
        left: 0.75rem;
        bottom: 0.75rem;
        max-width: none;
    }
}

/* Compact view: Hide detailed options by default */
.cookie-consent-banner:not(.expanded) .cookie-consent-options {
    display: none;
}

/* Compact Header Styling */
.cookie-consent-header {
    flex: 1;
    max-width: 700px;
}

.cookie-consent-header h5 {
    color: var(--yellow-primary, #FFD700);
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.2rem;
    display: inline-block;
}

.cookie-consent-header p {
    color: #e0e0e0;
    font-size: 0.78rem;
    line-height: 1.35;
    margin-bottom: 0;
}

.cookie-consent-header a {
    color: var(--yellow-primary, #FFD700);
    text-decoration: underline;
    font-weight: 500;
}

.cookie-consent-header a:hover {
    color: #FFEB3B;
}

/* Expanded view - show full layout */
.cookie-consent-banner.expanded {
    padding: 2rem 0;
}

.cookie-consent-banner.expanded .cookie-consent-content {
    flex-direction: column;
    align-items: stretch;
}

.cookie-consent-banner.expanded .cookie-consent-header {
    max-width: 100%;
}

.cookie-consent-options {
    margin: 1.5rem 0;
    display: grid;
    gap: 1rem;
}

.cookie-category {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: 8px;
    padding: 1rem;
    transition: all 0.3s ease;
}

.cookie-category:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 215, 0, 0.4);
}

.cookie-category strong {
    color: #ffffff;
    font-size: 0.95rem;
}

.cookie-category .text-muted {
    color: #b0b0b0 !important;
    font-size: 0.85rem;
}

.cookie-category .badge {
    font-size: 0.75rem;
    padding: 0.4rem 0.8rem;
}

.cookie-category .form-switch {
    min-height: unset;
}

.cookie-category .form-check-input {
    width: 3rem;
    height: 1.5rem;
    cursor: pointer;
}

.cookie-category .form-check-input:checked {
    background-color: var(--yellow-primary, #FFD700);
    border-color: var(--yellow-primary, #FFD700);
}

.cookie-category .form-check-input:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.cookie-consent-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
    flex-shrink: 0;
}

.cookie-consent-banner.expanded .cookie-consent-actions {
    justify-content: center;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.cookie-consent-actions .btn {
    font-weight: 500;
    padding: 0.35rem 0.7rem;
    font-size: 0.8rem;
    white-space: nowrap;
}

.cookie-consent-actions .btn-sm {
    padding: 0.3rem 0.6rem;
    font-size: 0.75rem;
}

/* Mobile Responsive */
@media (max-width: 992px) {
    .cookie-consent-content {
        flex-direction: column;
        gap: 1rem;
    }

    .cookie-consent-header {
        max-width: 100%;
    }

    .cookie-consent-actions {
        width: 100%;
        justify-content: stretch;
    }

    .cookie-consent-actions .btn {
        flex: 1;
    }
}

@media (max-width: 768px) {
    .cookie-consent-banner {
        padding: 1rem 0;
    }

    .cookie-consent-banner.expanded {
        padding: 1.5rem 0;
    }

    .cookie-consent-content {
        padding: 0 1rem;
    }

    .cookie-consent-actions {
        flex-wrap: wrap;
    }

    .cookie-consent-actions .btn {
        width: 100%;
        min-width: unset;
    }

    .cookie-category .d-flex {
        flex-direction: column;
        gap: 0.5rem;
    }

    .cookie-category .form-switch {
        align-self: flex-start;
    }
}

/* ============================================
   LEGAL CONTENT PAGES STYLING
   ============================================ */

.legal-content {
    max-width: 900px;
    margin: 0 auto;
}

.legal-content h3 {
    margin-top: 2rem;
}

.legal-content h3:first-child {
    margin-top: 0;
}

.legal-content h5 {
    color: #ffffff;
    font-weight: 600;
    margin-top: 1.5rem;
}

.legal-content ul {
    line-height: 1.8;
}

.legal-content p {
    line-height: 1.7;
    margin-bottom: 1rem;
}

.legal-content a {
    color: var(--yellow-primary, #FFD700);
    text-decoration: underline;
}

.legal-content a:hover {
    color: #FFEB3B;
}

.legal-content strong {
    color: #ffffff;
}

.legal-content table {
    width: 100%;
    margin-top: 1rem;
    margin-bottom: 1rem;
}

.legal-content table th,
.legal-content table td {
    padding: 0.75rem;
    vertical-align: top;
}

.legal-content code {
    background-color: rgba(255, 215, 0, 0.1);
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    color: var(--yellow-primary, #FFD700);
}

/* Toast Notification for Consent Saved */
.consent-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    min-width: 300px;
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .cookie-consent-banner {
        background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
    }
}
