/* ============================================================
   LEGAL FOOTER + CONTACT US — GalaxySeven
   Shared across all page templates via _legal_modals.html
   ============================================================ */

/* ═══════════════════════════════════════════════════════════════
   LEGAL TEXT MODALS (Terms, Privacy, Cardholder)
   ═══════════════════════════════════════════════════════════════ */
.legal-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.legal-modal.active {
    opacity: 1;
    pointer-events: all;
}

.legal-modal-bg {
    position: absolute;
    inset: 0;
    background: rgba(5, 9, 20, 0.82);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 0;
}

.legal-modal-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 650px;
    max-height: 85vh;
    background: rgba(10, 14, 30, 0.97);
    border: 1px solid rgba(100, 60, 255, 0.25);
    border-radius: 16px;
    overflow: hidden;
    box-shadow:
        0 0 40px rgba(100, 60, 255, 0.1),
        0 25px 60px rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    animation: legalSlideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes legalSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.legal-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(100, 60, 255, 0.15);
    flex-shrink: 0;
}

.legal-modal-title {
    font-family: "Orbitron", "Maven Pro", sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
    letter-spacing: 0.04em;
}

.legal-modal-close {
    width: 32px;
    height: 32px;
    border: 1px solid rgba(100, 60, 255, 0.2);
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.7);
    color: #94a3b8;
    font-size: 1.3rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    line-height: 1;
}

.legal-modal-close:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.4);
    color: #ef4444;
}

.legal-modal-body {
    padding: 24px 28px 28px;
    overflow-y: auto;
    flex: 1;
}

.legal-modal-body::-webkit-scrollbar {
    width: 6px;
}

.legal-modal-body::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.3);
    border-radius: 3px;
}

.legal-modal-body::-webkit-scrollbar-thumb {
    background: rgba(100, 60, 255, 0.3);
    border-radius: 3px;
}

.legal-modal-body::-webkit-scrollbar-thumb:hover {
    background: rgba(100, 60, 255, 0.5);
}

.legal-last-updated {
    font-size: 0.72rem;
    color: rgba(148, 163, 184, 0.5);
    margin: 0 0 20px;
    font-style: italic;
}

.legal-modal-body h3 {
    font-family: "Orbitron", "Maven Pro", sans-serif;
    font-size: 0.88rem;
    font-weight: 700;
    color: #06b6d4;
    margin: 22px 0 8px;
    letter-spacing: 0.03em;
}

.legal-modal-body h3:first-of-type {
    margin-top: 0;
}

.legal-modal-body p {
    font-size: 0.8rem;
    color: #94a3b8;
    line-height: 1.7;
    margin: 0 0 12px;
}

.legal-modal-body ul {
    margin: 0 0 12px;
    padding-left: 20px;
}

.legal-modal-body li {
    font-size: 0.8rem;
    color: #94a3b8;
    line-height: 1.7;
    margin-bottom: 4px;
}

.legal-modal-body strong {
    color: #cbd5e1;
}

/* ═══════════════════════════════════════════════════════════════
   CONSENT LINK (clickable legal terms everywhere)
   ═══════════════════════════════════════════════════════════════ */
.consent-link {
    color: #06b6d4;
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.consent-link:hover {
    color: #22d3ee;
    text-shadow: 0 0 10px rgba(6, 182, 212, 0.4);
}

/* ═══════════════════════════════════════════════════════════════
   GLOBAL LEGAL FOOTER BAR
   ═══════════════════════════════════════════════════════════════ */
.global-legal-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    z-index: 50;
    width: 100%;
    padding: 14px 0;
    background: rgba(10, 14, 30, 0.92);
    border-top: 1px solid rgba(100, 60, 255, 0.12);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    opacity: 0;
    pointer-events: none;
    transform: translateY(100%);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.global-legal-footer.visible {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0);
}

/* Reserve space at page bottom so fixed footer never overlaps content */
body {
    padding-bottom: 50px;
}

.global-legal-footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.global-legal-footer-text {
    font-size: 0.75rem;
    color: rgba(148, 163, 184, 0.5);
}

.global-legal-footer-text .consent-link {
    font-size: 0.75rem;
    font-weight: 500;
}

.global-legal-footer-divider {
    color: rgba(148, 163, 184, 0.25);
    font-size: 0.8rem;
}

.contact-us-link {
    color: #f59e0b !important;
    font-weight: 600;
    font-size: 0.78rem !important;
}

.contact-us-link:hover {
    color: #fbbf24 !important;
    text-shadow: 0 0 10px rgba(245, 158, 11, 0.4);
}

/* ═══════════════════════════════════════════════════════════════
   CONTACT US FORM (inside modal)
   ═══════════════════════════════════════════════════════════════ */
.contact-modal-card {
    max-width: 520px;
}

.contact-subtitle {
    font-size: 0.82rem;
    color: #94a3b8;
    margin: 0 0 20px;
    line-height: 1.5;
    text-align: center;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.contact-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.contact-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.contact-required {
    color: #ef4444;
    font-weight: 700;
}

.contact-input {
    width: 100%;
    padding: 11px 14px;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(100, 60, 255, 0.2);
    border-radius: 8px;
    color: #e2e8f0;
    font-family: "Montserrat", sans-serif;
    font-size: 0.85rem;
    outline: none;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.contact-input::placeholder {
    color: rgba(148, 163, 184, 0.35);
}

.contact-input:focus {
    border-color: #8b5cf6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1), 0 0 20px rgba(139, 92, 246, 0.08);
    background: rgba(20, 30, 55, 0.9);
}

.contact-select {
    cursor: pointer;
    appearance: none;
    -webkit-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='%2394a3b8' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}

.contact-select option {
    background: #0f172a;
    color: #e2e8f0;
}

.contact-textarea {
    resize: vertical;
    min-height: 100px;
    font-family: "Montserrat", sans-serif;
}

/* Status message */
.contact-status {
    font-size: 0.8rem;
    text-align: center;
    min-height: 20px;
    font-weight: 500;
}

.contact-status.error {
    color: #ef4444;
}

.contact-status.success {
    color: #22c55e;
}

/* Submit button */
.contact-btn-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    border: none;
    border-radius: 10px;
    color: #fff;
    font-family: "Orbitron", "Maven Pro", sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.contact-btn-submit::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.12), transparent);
    transition: left 0.5s;
}

.contact-btn-submit:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(139, 92, 246, 0.4);
}

.contact-btn-submit:hover:not(:disabled)::before {
    left: 100%;
}

.contact-btn-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.contact-btn-arrow {
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}

.contact-btn-submit:hover:not(:disabled) .contact-btn-arrow {
    transform: translateX(3px);
}

/* Success state */
.contact-success {
    text-align: center;
    padding: 20px 0;
}

.contact-success-icon {
    font-size: 3rem;
    margin-bottom: 12px;
}

.contact-success h3 {
    font-family: "Orbitron", "Maven Pro", sans-serif;
    font-size: 1.1rem;
    color: #22c55e;
    margin: 0 0 8px;
}

.contact-success p {
    font-size: 0.85rem;
    color: #94a3b8;
    line-height: 1.6;
    margin: 0 0 20px;
}

.contact-success strong {
    color: #e2e8f0;
}

.contact-btn-done {
    max-width: 200px;
    margin: 0 auto;
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 540px) {
    .legal-modal-card {
        margin: 10px;
        max-height: 90vh;
        border-radius: 12px;
    }

    .legal-modal-body {
        padding: 18px 16px 22px;
    }

    .legal-modal-header {
        padding: 16px 18px;
    }

    .global-legal-footer-inner {
        flex-direction: column;
        gap: 6px;
        text-align: center;
    }

    .global-legal-footer-divider {
        display: none;
    }

    .contact-modal-card {
        max-width: 100%;
    }
}
