/**
 * Shared UI Styles for PurseProof
 * Disclaimer Bar + Footer
 * Version: 1.0
 * Date: November 22, 2025
 */

/* ============================================
   1. CSS VARIABLES
   ============================================ */
:root {
    --disclaimer-bar-height: 65px;
    --disclaimer-bar-height-mobile: 75px;
    --disclaimer-bg-gradient: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
    --footer-bg-gradient: linear-gradient(135deg, #060b1a 0%, #0a1129 50%, #152042 100%);
    --gold: #d4af37;
    --gold-light: #f8e9b0;
    --white: #ffffff;
    --text-light: rgba(255, 255, 255, 0.7);
    --overlay-dark: rgba(0, 0, 0, 0.7);
    --box-shadow-bar: 0 -4px 20px rgba(0, 0, 0, 0.15);
    --trust-bar-bg: linear-gradient(135deg, #fefbf3 0%, #f8f3e6 100%);
}
/* ============================================
   2. LANDSCAPE ORIENTATION TOAST
   ============================================ */
.landscape-toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
    color: var(--white);
    padding: 12px 24px;
    border-radius: 25px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    z-index: 10001;
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    font-weight: 500;
    max-width: 90%;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.landscape-toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.landscape-toast-icon {
    font-size: 18px;
    flex-shrink: 0;
}

.landscape-toast-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: var(--white);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    margin-left: 8px;
    flex-shrink: 0;
    transition: background 0.2s ease;
}

.landscape-toast-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.landscape-toast-close:active {
    background: rgba(255, 255, 255, 0.4);
}
/* ============================================
   3. PRIVACY TRUST BAR STYLES
   ============================================ */
.privacy-trust-bar {
    background: var(--trust-bar-bg);
    border-top: 1px solid rgba(212, 175, 55, 0.2);
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
    padding: 20px 0;
    position: relative;
    z-index: 100;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.privacy-trust-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    padding: 0 20px;
}

.privacy-trust-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.privacy-trust-icon {
    font-size: 20px;
    line-height: 1;
}

.privacy-trust-text {
    font-size: 15px;
    font-weight: 500;
    color: #0a1129;
    line-height: 1;
}

.privacy-trust-divider {
    color: rgba(10, 17, 41, 0.2);
    font-size: 18px;
    font-weight: 300;
}

/* Privacy Trust Bar Mobile */
@media (max-width: 768px) {
    .privacy-trust-bar {
        padding: 16px 0;
    }
    
    .privacy-trust-content {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
    
    .privacy-trust-item {
        justify-content: center;
    }
    
    .privacy-trust-text {
        font-size: 14px;
    }
    
    .privacy-trust-icon {
        font-size: 18px;
    }
    
    .privacy-trust-divider {
        display: none;
    }
}

/* ============================================
   4. DISCLAIMER BAR STYLES
   ============================================ */
.purseproof-disclaimer-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: var(--disclaimer-bar-height);
    background: var(--disclaimer-bg-gradient);
    border-top: 2px solid var(--gold);
    box-shadow: var(--box-shadow-bar);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
    transition: all 0.3s ease;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.disclaimer-bar-content {
    max-width: 1200px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-align: center;
}

.disclaimer-bar-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.disclaimer-bar-text {
    color: var(--white);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    margin: 0;
}

.disclaimer-bar-text-mobile {
    display: none;
}

.disclaimer-bar-link {
    color: var(--gold);
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.3s ease;
    white-space: nowrap;
    border-bottom: 1px solid transparent;
}

.disclaimer-bar-link:hover {
    color: var(--gold-light);
    border-bottom-color: var(--gold-light);
}

/* Mobile styles for disclaimer bar */
@media (max-width: 768px) {
    .purseproof-disclaimer-bar {
        height: var(--disclaimer-bar-height-mobile);
        padding: 12px 15px;
    }

    .disclaimer-bar-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .disclaimer-bar-text {
        font-size: 13px;
        text-align: left;
    }

    .disclaimer-bar-text-desktop {
        display: none;
    }

    .disclaimer-bar-text-mobile {
        display: block;
    }

    .disclaimer-bar-link {
        font-size: 13px;
    }
}

/* ============================================
   5. DISCLAIMER MODAL STYLES
   ============================================ */
.disclaimer-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--overlay-dark);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

.disclaimer-modal-overlay.active {
    display: flex;
}

.disclaimer-modal-content {
    background: var(--white);
    border-radius: 12px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

.disclaimer-modal-header {
    padding: 24px 24px 16px;
    border-bottom: 2px solid var(--gold);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.disclaimer-modal-header h2 {
    margin: 0;
    font-size: 24px;
    color: #1e3a8a;
    font-weight: 700;
}

.disclaimer-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #4a5568;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.disclaimer-modal-close:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #1e3a8a;
}

.disclaimer-modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
    color: #2d3748;
    line-height: 1.7;
}

.disclaimer-modal-body h3 {
    color: #1e3a8a;
    font-size: 18px;
    margin-top: 24px;
    margin-bottom: 12px;
    font-weight: 600;
}

.disclaimer-modal-body h3:first-child {
    margin-top: 0;
}

.disclaimer-modal-body p {
    margin-bottom: 16px;
    font-size: 15px;
}

.disclaimer-modal-body strong {
    color: #1e3a8a;
    font-weight: 600;
}

.disclaimer-modal-body ul {
    margin: 12px 0;
    padding-left: 24px;
}

.disclaimer-modal-body li {
    margin-bottom: 8px;
}

.disclaimer-last-updated {
    margin-top: 32px;
    padding-top: 16px;
    border-top: 1px solid #e2e8f0;
    font-size: 14px;
    color: #718096;
    font-style: italic;
}

/* Mobile modal */
@media (max-width: 768px) {
    .disclaimer-modal-overlay {
        padding: 0;
    }

    .disclaimer-modal-content {
        max-width: 100%;
        max-height: 100vh;
        height: 100vh;
        border-radius: 0;
    }

    .disclaimer-modal-header {
        padding: 20px;
    }

    .disclaimer-modal-header h2 {
        font-size: 20px;
    }

    .disclaimer-modal-body {
        padding: 20px;
    }

    .disclaimer-modal-body h3 {
        font-size: 16px;
    }

    .disclaimer-modal-body p {
        font-size: 14px;
    }
}

/* ============================================
   6. FOOTER STYLES
   ============================================ */
.purseproof-shared-footer {
    background: var(--footer-bg-gradient);
    border-top: 2px solid var(--gold);
    color: var(--white);
    padding-bottom: var(--disclaimer-bar-height);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 20px 20px;
}

.footer-navigation {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-bottom: 40px;
}

.footer-column h4 {
    color: var(--gold);
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    margin-top: 0;
}

.footer-column p {
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 16px;
    font-size: 0.95rem;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    display: inline-block;
}

.footer-links a:hover {
    color: var(--gold-light);
    transform: translateX(4px);
}

.footer-links a:focus {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
    border-radius: 2px;
}

.footer-home-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--gold);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    margin-top: 12px;
}

.footer-home-link:hover {
    color: var(--gold-light);
    transform: translateX(-4px);
}

.footer-home-link::before {
    content: "←";
    font-size: 18px;
}

.footer-copyright {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(212, 175, 55, 0.2);
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Footer responsive - Tablet */
@media (max-width: 768px) {
    .purseproof-shared-footer {
        padding-bottom: var(--disclaimer-bar-height-mobile);
    }

    .footer-content {
        padding: 50px 20px 20px;
    }

    .footer-navigation {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }

    .footer-column:last-child {
        grid-column: 1 / -1;
    }

    .footer-links a {
        font-size: 0.9rem;
    }
}

/* Footer responsive - Mobile */
@media (max-width: 480px) {
    .footer-content {
        padding: 40px 20px 20px;
    }

    .footer-navigation {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .footer-column:last-child {
        grid-column: auto;
    }

    .footer-column h4 {
        font-size: 16px;
        margin-bottom: 16px;
    }

    .footer-links a {
        font-size: 0.85rem;
    }

    .footer-column p {
        font-size: 0.85rem;
    }

    .footer-copyright {
        font-size: 0.8rem;
        padding-top: 20px;
    }
}

/* ============================================
   7. ANIMATIONS
   ============================================ */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   8. ACCESSIBILITY
   ============================================ */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Focus visible styles */
.disclaimer-bar-link:focus-visible,
.footer-links a:focus-visible,
.footer-home-link:focus-visible {
    outline: 2px solid var(--gold-light);
    outline-offset: 2px;
    border-radius: 2px;
}

/* Ensure proper focus for keyboard navigation */
.disclaimer-modal-close:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
