/* WhatsApp Redirect Page Styles */
:root {
    --text-color: #333333;
    --accent-color: #F29F05;
    --background-dark: #000000;
    --whatsapp-color: #25D366;
    --text-light: #fdf6ea;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Montserrat', sans-serif;
    line-height: 1.6;
    background-color: var(--background-dark);
    color: var(--text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    min-height: 100dvh; /* Dynamic viewport height for mobile browsers */
    height: 100vh; /* Ensure consistent height calculation */
    height: 100dvh;
    text-align: center;
    overflow-x: hidden;
    /* overflow-y managed per breakpoint to ensure content fits */
    -webkit-text-size-adjust: 100%; /* Prevent automatic text scaling on iOS */
}

.redirect-container {
    max-width: 600px;
    padding: 1.5rem;
    width: 100%;
    box-sizing: border-box;
}

.logo {
    width: 80px;
    height: auto;
    margin-bottom: 1.5rem;
    opacity: 0;
    animation: fadeInUp 0.8s ease-out forwards;
}

.redirect-container h1 {
    font-family: 'Lora', serif !important;
    font-size: 1.8rem !important;
    margin-bottom: 0.8rem;
    opacity: 0;
    animation: fadeInUp 0.8s ease-out 0.2s forwards;
    line-height: 1.3;
}

.subtitle {
    font-size: 1rem;
    margin-bottom: 1.5rem;
    opacity: 0;
    animation: fadeInUp 0.8s ease-out 0.4s forwards;
    line-height: 1.5;
    max-width: 90%;
    margin-left: auto;
    margin-right: auto;
}

.loading-animation {
    display: inline-block;
    margin: 1.5rem 0;
    opacity: 0;
    animation: fadeInUp 0.8s ease-out 0.6s forwards;
}

.whatsapp-icon {
    font-size: 2.5rem;
    color: var(--whatsapp-color);
    margin-bottom: 0.8rem;
    animation: pulse 2s infinite;
}

.loading-text {
    font-size: 0.9rem;
    margin-bottom: 0.8rem;
    line-height: 1.4;
}

.manual-link {
    display: inline-block;
    background-color: var(--whatsapp-color);
    color: white;
    padding: 0.8rem 1.5rem;
    text-decoration: none;
    border-radius: 25px;
    margin-top: 1.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    opacity: 0;
    animation: fadeInUp 0.8s ease-out 1s forwards;
    max-width: 80%;
    box-sizing: border-box;
    min-height: 44px; /* Minimum touch target size */
    display: flex;
    align-items: center;
    justify-content: center;
}

.manual-link:hover {
    background-color: #20c35a;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37, 211, 102, 0.3);
}

.manual-link i {
    margin-right: 0.5rem;
}

.back-link {
    display: inline-block;
    color: var(--accent-color);
    text-decoration: none;
    margin-top: 1rem;
    opacity: 0;
    animation: fadeInUp 0.8s ease-out 1.2s forwards;
    font-size: 0.85rem;
}

.back-link:hover {
    text-decoration: underline;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* Large mobile phones and small tablets */
@media (max-width: 640px) and (min-width: 481px) {
    .redirect-container {
        padding: 1.75rem 1.5rem;
        max-width: 85%;
    }
    
    .redirect-container h1 {
        font-size: 1.9rem !important;
        margin-bottom: 1rem;
        line-height: 1.3;
    }
    
    .subtitle {
        font-size: 1.1rem;
        margin-bottom: 2rem;
        line-height: 1.6;
    }
    
    .loading-animation {
        margin: 2.25rem 0;
    }
    
    .whatsapp-icon {
        font-size: 2.75rem;
        margin-bottom: 1.25rem;
    }
    
    .loading-text {
        font-size: 1rem;
        margin-bottom: 1.25rem;
        line-height: 1.5;
    }
    
    .manual-link {
        padding: 1.1rem 1.75rem;
        font-size: 1rem;
        margin-top: 2.25rem;
        max-width: 80%;
    }
    
    .back-link {
        font-size: 0.9rem;
        margin-top: 1.75rem;
    }
}

/* ===============================
   MOBILE OPTIMIZATION STRATEGY
   ===============================
   Goal: Fit all content in one screen without scrolling
   - Reduced title font sizes for better space utilization
   - Compressed margins and padding while maintaining usability
   - Multiple breakpoints for different phone sizes and heights
   - Touch-friendly button sizing maintained
   =============================== */

/* Mobile Specific Styles */
@media (max-width: 480px) {
    body {
        overflow-y: auto; /* Allow scrolling if needed, but optimized to avoid it */
    }
    
    .redirect-container {
        padding: 1rem 1.25rem 0.5rem;
        max-width: 92%;
    }
    
    .logo {
        width: 60px;
        margin-bottom: 0.75rem;
    }
    
    .redirect-container h1 {
        font-size: 1.4rem !important;
        margin-bottom: 0.75rem;
        line-height: 1.2;
        padding: 0 0.5rem;
        hyphens: auto;
        max-width: 100%;
    }
    
    .subtitle {
        font-size: 0.9rem;
        margin-bottom: 1.25rem;
        line-height: 1.4;
        max-width: 100%;
        padding: 0 0.5rem;
    }
    
    .loading-animation {
        margin: 1.25rem 0;
    }
    
    .whatsapp-icon {
        font-size: 2.2rem;
        margin-bottom: 0.75rem;
    }
    
    .loading-text {
        font-size: 0.85rem;
        margin-bottom: 0.75rem;
        line-height: 1.4;
        padding: 0 0.5rem;
    }
    
    .manual-link {
        padding: 0.85rem 1.4rem;
        font-size: 0.9rem;
        margin-top: 1.25rem;
        max-width: 85%;
        display: block;
        text-align: center;
        line-height: 1.3;
    }
    
    .back-link {
        font-size: 0.8rem;
        margin-top: 1rem;
    }
}

/* Very small screens */
@media (max-width: 320px) {
    .redirect-container {
        padding: 0.75rem 1rem 0.25rem;
    }
    
    .logo {
        width: 50px;
        margin-bottom: 0.5rem;
    }
    
    .redirect-container h1 {
        font-size: 1.1rem !important;
        line-height: 1.1;
        padding: 0 0.25rem;
        margin-bottom: 0.5rem;
        word-wrap: break-word;
        hyphens: auto;
        max-width: 100%;
    }
    
    .subtitle {
        font-size: 0.8rem;
        line-height: 1.3;
        margin-bottom: 1rem;
        padding: 0 0.25rem;
    }
    
    .loading-animation {
        margin: 1rem 0;
    }
    
    .whatsapp-icon {
        font-size: 2rem;
        margin-bottom: 0.5rem;
    }
    
    .loading-text {
        font-size: 0.75rem;
        line-height: 1.3;
        padding: 0 0.25rem;
        margin-bottom: 0.5rem;
    }
    
    .manual-link {
        padding: 0.75rem 1.1rem;
        font-size: 0.8rem;
        border-radius: 20px;
        margin-top: 1rem;
        line-height: 1.2;
    }
    
    .back-link {
        font-size: 0.7rem;
        margin-top: 0.75rem;
    }
}

/* Portrait phone optimization - fit in one screen */
@media (max-width: 480px) and (orientation: portrait) and (max-height: 800px) {
    .redirect-container {
        padding: 0.5rem 1.25rem 0.25rem;
    }
    
    .logo {
        width: 55px;
        margin-bottom: 0.5rem;
    }
    
    .redirect-container h1 {
        font-size: 1.2rem !important;
        margin-bottom: 0.5rem;
        line-height: 1.1;
        word-wrap: break-word;
        hyphens: auto;
        max-width: 100%;
        padding: 0 0.5rem;
    }
    
    .subtitle {
        font-size: 0.85rem;
        margin-bottom: 1rem;
        line-height: 1.3;
    }
    
    .loading-animation {
        margin: 1rem 0;
    }
    
    .whatsapp-icon {
        font-size: 2.1rem;
        margin-bottom: 0.5rem;
    }
    
    .loading-text {
        font-size: 0.8rem;
        margin-bottom: 0.5rem;
        line-height: 1.3;
    }
    
    .manual-link {
        padding: 0.8rem 1.3rem;
        font-size: 0.85rem;
        margin-top: 1rem;
        line-height: 1.2;
    }
    
    .back-link {
        font-size: 0.75rem;
        margin-top: 0.75rem;
    }
}

/* Extra compact for very short screens */
@media (max-width: 480px) and (orientation: portrait) and (max-height: 650px) {
    .redirect-container {
        padding: 0.25rem 1.25rem 0.1rem;
    }
    
    .logo {
        width: 50px;
        margin-bottom: 0.25rem;
    }
    
    .redirect-container h1 {
        font-size: 1.0rem !important;
        margin-bottom: 0.25rem;
        line-height: 1.1;
        word-wrap: break-word;
        hyphens: auto;
        max-width: 100%;
        padding: 0 0.25rem;
    }
    
    .subtitle {
        font-size: 0.8rem;
        margin-bottom: 0.75rem;
        line-height: 1.2;
    }
    
    .loading-animation {
        margin: 0.75rem 0;
    }
    
    .whatsapp-icon {
        font-size: 1.9rem;
        margin-bottom: 0.25rem;
    }
    
    .loading-text {
        font-size: 0.75rem;
        margin-bottom: 0.25rem;
        line-height: 1.2;
    }
    
    .manual-link {
        padding: 0.7rem 1.2rem;
        font-size: 0.8rem;
        margin-top: 0.75rem;
        line-height: 1.1;
    }
    
    .back-link {
        font-size: 0.7rem;
        margin-top: 0.5rem;
    }
}

/* Landscape mobile */
@media (max-width: 768px) and (orientation: landscape) {
    body {
        align-items: flex-start;
        padding-top: 1.5rem;
    }
    
    .redirect-container {
        max-width: 500px;
        padding: 1.25rem 1.5rem;
    }
    
    .redirect-container h1 {
        font-size: 1.6rem !important;
        margin-bottom: 0.75rem;
        line-height: 1.3;
    }
    
    .subtitle {
        font-size: 0.95rem;
        margin-bottom: 1.5rem;
        line-height: 1.5;
    }
    
    .loading-animation {
        margin: 1.5rem 0;
    }
    
    .whatsapp-icon {
        font-size: 2.2rem;
    }
    
    .loading-text {
        font-size: 0.9rem;
        line-height: 1.4;
    }
    
    .manual-link {
        padding: 0.8rem 1.4rem;
        font-size: 0.9rem;
        margin-top: 1.5rem;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    /* Already in dark theme, but ensure consistency */
    body {
        background-color: var(--background-dark);
        color: var(--text-light);
    }
}

/* High contrast support */
@media (prefers-contrast: high) {
    .manual-link {
        border: 2px solid white;
    }
    
    .back-link {
        text-decoration: underline;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
} 