/* Custom styles for Fat Buddha Thai website */

.thai-pattern {
    background-image: linear-gradient(45deg, rgba(217, 119, 6, 0.1) 25%, transparent 25%),
                      linear-gradient(-45deg, rgba(217, 119, 6, 0.1) 25%, transparent 25%),
                      linear-gradient(45deg, transparent 75%, rgba(217, 119, 6, 0.1) 75%),
                      linear-gradient(-45deg, transparent 75%, rgba(217, 119, 6, 0.1) 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
}

.cookie-banner {
    transform: translateY(100%);
    transition: transform 0.3s ease-in-out;
}

.cookie-banner.show {
    transform: translateY(0);
}

/* Smooth transitions */
* {
    transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

/* Focus states for accessibility */
input:focus, 
textarea:focus, 
select:focus, 
button:focus {
    outline: 2px solid #2D3748;
    outline-offset: 2px;
}

/* Loading animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

/* Image optimization */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Custom scrollbar for webkit browsers */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #2D3748;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #1A202C;
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    nav, footer, .cookie-banner {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    h1, h2, h3 {
        page-break-after: avoid;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .bg-primary {
        background-color: #000000 !important;
    }
    
    .text-gray-600 {
        color: #000000 !important;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .cookie-banner {
        transition: none;
    }
}

/* Container max-width consistency */
.container {
    max-width: 1200px;
}

/* Form validation styles */
.form-error {
    border-color: #E53E3E !important;
    background-color: #FED7D7 !important;
}

.error-message {
    color: #E53E3E;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Success states */
.form-success {
    border-color: #38A169 !important;
    background-color: #C6F6D5 !important;
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Mobile-first responsive improvements */
@media (max-width: 640px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    h1 {
        font-size: 2rem;
        line-height: 1.2;
    }
    
    .text-4xl {
        font-size: 2.25rem;
    }
    
    .text-5xl {
        font-size: 3rem;
    }
}

/* Performance optimizations */
.will-change-transform {
    will-change: transform;
}

.gpu-accelerated {
    transform: translateZ(0);
}
