/* CSIL Loan - Modern Nigerian Fintech Styles */

/* Navigation and Content Spacing Fix */
.nav-brand {
    min-height: 4rem; /* Ensure navigation has minimum height */
}

.logo-container {
    min-height: 3.5rem; /* Minimum height for logo container */
}

/* Hero Section Spacing */
.hero-section {
    padding-top: 8rem !important; /* Force proper spacing on mobile */
}

@media (min-width: 768px) {
    .hero-section {
        padding-top: 9rem !important; /* More spacing on tablets */
    }
}

@media (min-width: 1024px) {
    .hero-section {
        padding-top: 10rem !important; /* Even more spacing on desktop */
    }
}

/* Base Styles */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    scroll-behavior: smooth;
}

.font-poppins {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Logo and Branding Styles */
.logo-container {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.logo-container:hover {
    transform: scale(1.02);
}

.logo-image-container {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.logo-image-container img {
    transition: transform 0.3s ease;
}

.logo-container:hover .logo-image-container img {
    transform: scale(1.1);
}

.company-name {
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    letter-spacing: 0.025em;
    transition: all 0.3s ease;
}

.company-name div {
    transition: color 0.3s ease;
}

.logo-container:hover .company-name div:first-child {
    color: #1E40AF;
}

.logo-container:hover .company-name div:last-child {
    color: #059669;
}

.company-slogan {
    opacity: 0.8;
    transition: all 0.3s ease;
    font-weight: 500;
    letter-spacing: 0.05em;
    background: linear-gradient(45deg, #666666, #059669);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% 200%;
    animation: gradient-text 3s ease infinite;
}

@keyframes gradient-text {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.logo-container:hover .company-slogan {
    opacity: 1;
    transform: translateY(-1px);
}

/* Responsive Logo Adjustments */
@media (max-width: 640px) {
    .logo-container .company-name {
        font-size: 0.75rem; /* 12px */
        line-height: 1.1;
    }
    
    .logo-container .company-slogan {
        font-size: 0.625rem; /* 10px */
        margin-top: 0.125rem;
        letter-spacing: 0.025em;
    }
    
    .logo-container .logo-image-container {
        width: 2.75rem; /* 44px */
        height: 2.75rem; /* 44px */
        margin-right: 0.75rem; /* 12px */
    }
    
    .nav-brand {
        max-width: 75%;
    }
}

@media (min-width: 641px) and (max-width: 768px) {
    .logo-container .company-name {
        font-size: 0.875rem; /* 14px */
        line-height: 1.2;
    }
    
    .logo-container .company-slogan {
        font-size: 0.75rem; /* 12px */
        margin-top: 0.125rem;
    }
    
    .logo-container .logo-image-container {
        width: 3rem; /* 48px */
        height: 3rem; /* 48px */
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .logo-container .company-name {
        font-size: 1rem; /* 16px */
        line-height: 1.25;
    }
    
    .logo-container .company-slogan {
        font-size: 0.875rem; /* 14px */
        margin-top: 0.25rem;
    }
    
    .logo-container .logo-image-container {
        width: 3.5rem; /* 56px */
        height: 3.5rem; /* 56px */
    }
}

@media (min-width: 1025px) {
    .logo-container .company-name {
        font-size: 1.125rem; /* 18px */
        line-height: 1.3;
    }
    
    .logo-container .company-slogan {
        font-size: 0.875rem; /* 14px */
        margin-top: 0.25rem;
    }
    
    .logo-container .logo-image-container {
        width: 3.5rem; /* 56px */
        height: 3.5rem; /* 56px */
    }
}

/* Navigation Brand Area */
.nav-brand {
    max-width: 100%;
    overflow: hidden;
}

.nav-brand .company-info {
    min-width: 0; /* Allow flex items to shrink */
}

/* Footer Brand Adjustments */
.footer-brand .company-name {
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.footer-brand .company-slogan {
    color: #d1d5db;
    background: linear-gradient(45deg, #d1d5db, #10b981);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 500;
}

footer .logo-container:hover .logo-image-container {
    box-shadow: 0 8px 25px rgba(30, 64, 175, 0.3);
    transform: scale(1.05);
}

footer .company-name div:hover {
    text-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}

/* Custom Gradient Backgrounds */
.gradient-bg {
    background: linear-gradient(135deg, #1E40AF 0%, #059669 50%, #F59E0B 100%);
}

.gradient-primary {
    background: linear-gradient(135deg, #1E40AF 0%, #3B82F6 100%);
}

.gradient-secondary {
    background: linear-gradient(135deg, #059669 0%, #10B981 100%);
}

.gradient-accent {
    background: linear-gradient(135deg, #F59E0B 0%, #FBBF24 100%);
}

/* Card Hover Effects */
.card-hover {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(59, 130, 246, 0.1);
}

/* Navigation Styles */
.nav-link {
    position: relative;
    transition: all 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 50%;
    background: linear-gradient(90deg, #1E40AF, #059669);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after {
    width: 100%;
}

/* Page Transitions */
.page {
    min-height: 100vh;
    opacity: 1;
    transition: opacity 0.3s ease-in-out;
}

.page.hidden {
    opacity: 0;
    pointer-events: none;
}

/* Button Styles */
.btn-primary {
    background: linear-gradient(135deg, #1E40AF 0%, #3B82F6 100%);
    color: white;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(30, 64, 175, 0.3);
}

.btn-secondary {
    background: linear-gradient(135deg, #059669 0%, #10B981 100%);
    color: white;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(5, 150, 105, 0.3);
}

.btn-accent {
    background: linear-gradient(135deg, #F59E0B 0%, #FBBF24 100%);
    color: #111827;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-accent:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(245, 158, 11, 0.3);
}

/* Form Styles */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
select,
textarea {
    border: 2px solid #E5E7EB;
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: white;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #1E40AF;
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

/* File Upload Styling */
.file-upload-area {
    transition: all 0.3s ease;
}

.file-upload-area:hover {
    border-color: #1E40AF;
    background-color: #F8FAFC;
}

.file-upload-area.uploaded {
    border-color: #059669;
    background-color: #ECFDF5;
}

.file-upload-label {
    transition: all 0.3s ease;
}

.file-upload-input:focus + .file-upload-label {
    outline: 2px solid #1E40AF;
    outline-offset: 2px;
}

/* Form Section Styling */
.form-section {
    background: linear-gradient(135deg, #F8FAFC 0%, #FFFFFF 100%);
    border: 1px solid #E5E7EB;
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.form-section h3 {
    color: #1E40AF;
    border-bottom: 2px solid #E5E7EB;
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
}

.form-section h4 {
    color: #059669;
    margin-bottom: 1rem;
}

/* Enhanced Input Styling */
.form-input {
    transition: all 0.3s ease;
    border: 2px solid #E5E7EB;
}

.form-input:focus {
    border-color: #1E40AF;
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
    transform: translateY(-1px);
}

.form-input:valid {
    border-color: #059669;
}

/* Document Upload Animations */
@keyframes uploadSuccess {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.upload-success {
    animation: uploadSuccess 0.6s ease-out;
}

/* Address Verification Styling */
.address-field {
    position: relative;
}

.address-field::after {
    content: "🗺️";
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    opacity: 0.5;
}

/* Guarantor Section Styling */
.guarantor-section {
    background: linear-gradient(135deg, #ECFDF5 0%, #F0FDF4 100%);
    border-left: 4px solid #059669;
}

/* Loading Animation */
.loading-spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #1E40AF;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-left {
    animation: slideInLeft 0.8s ease-out;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-right {
    animation: slideInRight 0.8s ease-out;
}

/* Pulse Effect for CTAs */
.pulse-effect {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(30, 64, 175, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(30, 64, 175, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(30, 64, 175, 0);
    }
}

/* Nigerian Flag Colors Accent */
.nigeria-accent {
    border-left: 4px solid #008751;
    border-right: 4px solid #008751;
    position: relative;
}

.nigeria-accent::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 4px;
    background: white;
    transform: translateX(-50%);
}

/* Responsive Design */
@media (max-width: 768px) {
    .mobile-menu {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .mobile-menu.show {
        transform: translateX(0);
    }
    
    .hero-title {
        font-size: 2.5rem;
        line-height: 1.2;
    }
    
    .card-hover:hover {
        transform: translateY(-4px);
    }
}

@media (max-width: 640px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .grid-responsive {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

/* Mobile First Responsive Design */
@media (max-width: 767px) {
    /* Force mobile layout */
    html {
        font-size: 14px;
    }
    
    body {
        font-size: 14px;
        line-height: 1.5;
    }
    
    /* Navigation improvements */
    nav {
        position: fixed !important;
        top: 0;
        width: 100%;
        z-index: 50;
    }
    
    .nav-brand {
        max-width: 70%;
    }
    
    .company-info {
        min-width: 0;
        flex: 1;
    }
    
    .company-name div {
        font-size: 0.75rem !important;
        line-height: 1.1;
    }
    
    .company-slogan {
        font-size: 0.625rem !important;
        margin-top: 0.125rem;
    }
    
    /* Page sections */
    section {
        padding-top: 1rem !important;
        padding-bottom: 1rem !important;
    }
    
    .py-16 {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }
    
    .py-20 {
        padding-top: 3rem !important;
        padding-bottom: 3rem !important;
    }
    
    /* Form improvements */
    .form-input, input, select, textarea {
        font-size: 16px !important; /* Prevents zoom on iOS */
        padding: 0.75rem !important;
    }
    
    /* File upload areas */
    .file-upload-area {
        padding: 1rem !important;
    }
    
    .file-upload-area svg {
        width: 1.5rem !important;
        height: 1.5rem !important;
    }
    
    /* Calculator section */
    .loan-calculator {
        padding: 1rem !important;
    }
    
    /* Button improvements */
    button, .btn {
        min-height: 44px; /* Apple's recommended touch target */
        font-size: 16px !important;
    }
    
    /* Text scaling */
    h1 {
        font-size: 1.75rem !important;
        line-height: 1.2;
    }
    
    h2 {
        font-size: 1.5rem !important;
        line-height: 1.3;
    }
    
    h3 {
        font-size: 1.25rem !important;
        line-height: 1.4;
    }
    
    /* Grid improvements */
    .grid {
        gap: 1rem !important;
    }
    
    .md\:grid-cols-2 {
        grid-template-columns: 1fr !important;
    }
    
    .md\:grid-cols-3 {
        grid-template-columns: 1fr !important;
    }
    
    /* Spacing adjustments */
    .space-y-8 > * + * {
        margin-top: 1.5rem !important;
    }
    
    .space-y-6 > * + * {
        margin-top: 1rem !important;
    }
    
    /* Footer improvements */
    footer .grid:not(.grid-cols-2) {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
    }
    
    /* Allow 2-column layout for Quick Links and Services */
    footer .grid.grid-cols-2 {
        grid-template-columns: 1fr 1fr !important;
        gap: 2rem !important;
    }
    
    /* WhatsApp button positioning */
    .fixed.bottom-6.right-6 {
        bottom: 1rem !important;
        right: 1rem !important;
    }
}

/* Tablet responsive */
@media (min-width: 768px) and (max-width: 1023px) {
    .company-name div {
        font-size: 0.875rem !important;
    }
    
    .company-slogan {
        font-size: 0.75rem !important;
    }
}

/* Force mobile viewport behavior */
@viewport {
    width: device-width;
    initial-scale: 1.0;
    maximum-scale: 1.0;
    user-scalable: no;
}

/* Prevent horizontal scroll */
html, body {
    overflow-x: hidden;
    max-width: 100vw;
}

/* Touch-friendly interactions */
@media (hover: none) and (pointer: coarse) {
    .hover\:scale-105:hover {
        transform: scale(1.02) !important;
    }
    
    .hover\:bg-blue-700:hover {
        background-color: #1d4ed8 !important;
    }
    
    .hover\:text-primary:hover {
        color: #1E40AF !important;
    }
}

/* Accessibility */
.focus-visible:focus {
    outline: 2px solid #1E40AF;
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .no-print {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
}

/* WhatsApp Button Styles */
.whatsapp-float {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 1000;
    animation: pulse 2s infinite;
}

/* Success and Error States */
.success-state {
    background: linear-gradient(135deg, #059669 0%, #10B981 100%);
    color: white;
    padding: 1rem;
    border-radius: 12px;
    animation: fadeIn 0.5s ease-out;
}

.error-state {
    background: linear-gradient(135deg, #DC2626 0%, #EF4444 100%);
    color: white;
    padding: 1rem;
    border-radius: 12px;
    animation: fadeIn 0.5s ease-out;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #1E40AF 0%, #059669 100%);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #1D4ED8 0%, #047857 100%);
}

/* Enhanced Navigation Bar */
nav {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
}

nav .nav-brand {
    padding: 0.5rem 0;
}

/* Logo Loading Animation */
@keyframes logoLoad {
    0% { opacity: 0; transform: scale(0.8) rotate(-10deg); }
    100% { opacity: 1; transform: scale(1) rotate(0deg); }
}

.logo-image-container img {
    animation: logoLoad 0.6s ease-out;
}

/* Company Info Animation */
@keyframes slideInFromLeft {
    0% { opacity: 0; transform: translateX(-20px); }
    100% { opacity: 1; transform: translateX(0); }
}

.company-info {
    animation: slideInFromLeft 0.8s ease-out 0.2s both;
}

/* Scroll Animation Styles - Fast and Responsive */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    /* Faster fallback: Show content after 1 second if animation doesn't trigger */
    animation: showContentFallback 0.1s ease-in-out 1s forwards;
}

/* JavaScript disabled fallback */
.no-js .animate-on-scroll {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
}

/* Critical sections that must always be visible */
footer, 
section,
.footer,
.section {
    opacity: 1 !important;
    display: block !important;
}

/* Ensure footer is always visible */
footer.animate-on-scroll {
    animation-delay: 0s !important;
}

@keyframes showContentFallback {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-on-scroll.animate-in {
    opacity: 1;
    transform: translateY(0);
    animation: none; /* Cancel fallback animation if element is properly animated */
}

/* Hero section should be visible immediately */
.hero-section {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
}

.animate-on-scroll.animate-from-left {
    transform: translateX(-50px);
}

.animate-on-scroll.animate-from-right {
    transform: translateX(50px);
}

.animate-on-scroll.animate-from-bottom {
    transform: translateY(50px);
}

.animate-on-scroll.animate-scale {
    transform: scale(0.9);
}

.animate-on-scroll.animate-in.animate-from-left,
.animate-on-scroll.animate-in.animate-from-right,
.animate-on-scroll.animate-in.animate-from-bottom,
.animate-on-scroll.animate-in.animate-scale {
    transform: translateX(0) translateY(0) scale(1);
}

/* Stagger animations for child elements - Fast and Responsive */
.animate-stagger > * {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    /* Faster fallback: Show content after 1.2 seconds if animation doesn't trigger */
    animation: showStaggerFallback 0.1s ease-in-out 1.2s forwards;
}

@keyframes showStaggerFallback {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-stagger.animate-in > * {
    opacity: 1;
    transform: translateY(0);
    animation: none; /* Cancel fallback animation if element is properly animated */
}

/* Ensure stagger children are visible when parent is animated */
.animate-stagger.animate-in > * {
    opacity: 1;
    transform: translateY(0);
}

.animate-stagger.animate-in > *:nth-child(1) { transition-delay: 0.05s; }
.animate-stagger.animate-in > *:nth-child(2) { transition-delay: 0.1s; }
.animate-stagger.animate-in > *:nth-child(3) { transition-delay: 0.15s; }
.animate-stagger.animate-in > *:nth-child(4) { transition-delay: 0.2s; }
.animate-stagger.animate-in > *:nth-child(5) { transition-delay: 0.25s; }
.animate-stagger.animate-in > *:nth-child(6) { transition-delay: 0.3s; }

/* Mobile Menu Animation */
#mobile-menu {
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

#mobile-menu.animate-in {
    opacity: 1;
    transform: translateY(0);
}

#mobile-menu a {
    opacity: 0;
    transform: translateX(-20px);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

#mobile-menu.animate-in a {
    opacity: 1;
    transform: translateX(0);
}

#mobile-menu.animate-in a:nth-child(1) { transition-delay: 0.1s; }
#mobile-menu.animate-in a:nth-child(2) { transition-delay: 0.15s; }
#mobile-menu.animate-in a:nth-child(3) { transition-delay: 0.2s; }
#mobile-menu.animate-in a:nth-child(4) { transition-delay: 0.25s; }
#mobile-menu.animate-in a:nth-child(5) { transition-delay: 0.3s; }
#mobile-menu.animate-in a:nth-child(6) { transition-delay: 0.35s; }

/* Professional Choice Modal Styles - Mobile-Friendly */
#choiceModal {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 1rem;
}

#choiceModalCard {
    /* Desktop: Rectangular shape */
    width: 100%;
    max-width: 42rem; /* 672px - wider for desktop */
    height: auto;
    max-height: 70vh; /* Reduced height for desktop */
    overflow-y: auto;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation: modalSlideIn 0.5s ease-out;
    aspect-ratio: 3/2; /* Rectangular aspect ratio for desktop */
}

@keyframes modalSlideIn {
    from {
        transform: scale(0.9) translateY(-20px);
        opacity: 0;
    }
    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

/* Modal animation enhancements */
.modal-choice-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-choice-card:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.15);
}

/* Responsive modal adjustments */
@media (max-width: 768px) {
    #choiceModal {
        padding: 0.5rem;
    }
    
    #choiceModalCard {
        /* Mobile: Square shape */
        max-width: 90vw;
        max-height: 90vw; /* Square dimensions */
        aspect-ratio: 1/1; /* Perfect square */
        border-radius: 1rem;
    }
    
    .modal-choice-card {
        padding: 1rem;
    }
    
    .modal-choice-card:hover {
        transform: translateY(-1px) scale(1.01);
    }
}

@media (max-width: 480px) {
    #choiceModal {
        padding: 0.25rem;
    }
    
    #choiceModalCard {
        /* Small mobile: Smaller square */
        max-width: 85vw;
        max-height: 85vw; /* Smaller square for very small screens */
        aspect-ratio: 1/1; /* Perfect square */
        border-radius: 0.75rem;
    }
    
    .modal-choice-card {
        padding: 0.75rem;
    }
}

/* Ensure buttons are clearly visible */
.modal-choice-card button {
    font-size: 0.875rem;
    font-weight: 700;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.modal-choice-card button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px -3px rgba(0, 0, 0, 0.2);
}

/* Mobile button improvements */
@media (max-width: 480px) {
    .modal-choice-card button {
        padding: 1rem;
        font-size: 1rem;
        min-height: 48px; /* Better touch targets */
    }
}

/* Modal Close Button Styles */
#modalCloseButton {
    cursor: pointer !important;
    pointer-events: auto !important;
    z-index: 9999 !important;
    position: absolute !important;
    top: 1rem !important;
    right: 1rem !important;
    width: 2rem !important;
    height: 2rem !important;
    background: rgba(255, 255, 255, 0.9) !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.3s ease !important;
    border: none !important;
    outline: none !important;
}

#modalCloseButton:hover {
    background: rgba(255, 255, 255, 1) !important;
    transform: scale(1.1) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

#modalCloseButton:active {
    transform: scale(0.95) !important;
}

#modalCloseButton svg {
    width: 1rem !important;
    height: 1rem !important;
    stroke: #374151 !important;
    stroke-width: 2px !important;
}

/* Ensure modal is properly positioned */
#choiceModal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    z-index: 9998 !important;
}

#choiceModalCard {
    position: relative !important;
    z-index: 9999 !important;
}
