/* Custom styles for enhanced UI - Mobile First */

/* Smooth transitions */
* {
    transition: all 0.2s ease-in-out;
}

/* Elegant header styling */
header img {
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
    animation: fadeInDown 0.6s ease-out;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fade in animation for centre info card */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.animate-fadeIn {
    animation: fadeIn 0.4s ease-out;
}

/* Touch optimization */
button, a, input, select, textarea {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

/* Prevent text size adjustment on iOS */
input, select, textarea {
    font-size: 16px !important;
}

@media (min-width: 640px) {
    input, select, textarea {
        font-size: inherit;
    }
}

/* Enhanced focus states */
input:focus, select:focus, textarea:focus {
    transform: translateY(-1px);
}

/* Button hover effects with micro-interactions */
button:hover {
    transform: translateY(-1px);
}

button:active {
    transform: translateY(0);
    transition: all 0.1s ease-out;
}

/* Custom scrollbar with beautiful styling */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
}

/* Address suggestions dropdown */
.address-suggestions {
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.15);
    backdrop-filter: blur(10px);
}

.address-suggestions button {
    background: transparent;
}

.address-suggestions button:hover,
.address-suggestions button:focus {
    background: rgba(59, 130, 246, 0.08);
}

/* Mobile-first responsive adjustments */
@media (max-width: 640px) {
    /* Ensure minimum touch target sizes */
    button, input[type="button"], input[type="submit"], select {
        min-height: 48px;
        min-width: 48px;
    }

    /* Better spacing on mobile */
    .space-y-4 > * + * {
        margin-top: 1.5rem;
    }

    .space-y-6 > * + * {
        margin-top: 2rem;
    }

    /* Full width buttons on mobile */
    button[type="submit"] {
        width: 100%;
    }

    /* Prevent horizontal scroll */
    body {
        overflow-x: hidden;
    }

    /* Better form spacing */
    form > div {
        margin-bottom: 1.5rem;
    }

    /* Larger touch targets for mobile */
    .bhajan-day, .bhajan-time {
        min-height: 52px;
    }

    /* Improved readability */
    h1, h2, h3 {
        line-height: 1.2;
    }

    /* Better modal on mobile */
    #previewModal .bg-white {
        margin: 0.5rem;
        max-height: calc(100vh - 1rem);
    }
}

/* Improve readability on small screens */
@media (max-width: 375px) {
    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    .text-sm {
        font-size: 0.9rem;
    }

    .text-xs {
        font-size: 0.8rem;
    }
}

/* Optimize for tablets */
@media (min-width: 640px) and (max-width: 1024px) {
    .container {
        padding: 2rem;
    }
}

/* Optimize for large screens */
@media (min-width: 1280px) {
    .container {
        max-width: 5xl;
    }
}

/* Focus styles */
input:focus,
select:focus,
textarea:focus {
    outline: none;
}

/* Form input animations */
input:focus,
select:focus,
textarea:focus {
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Button hover effects */
button:hover {
    transform: translateY(-1px);
}

button:active {
    transform: translateY(0);
}

/* Message animation */
#message {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

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

/* Mobile-first responsive adjustments */
@media (max-width: 640px) {
    /* Ensure minimum touch target sizes */
    button, input[type="button"], input[type="submit"], select {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Better spacing on mobile */
    .space-y-4 > * + * {
        margin-top: 1rem;
    }
    
    /* Full width buttons on mobile */
    button[type="submit"] {
        width: 100%;
    }
    
    /* Prevent horizontal scroll */
    body {
        overflow-x: hidden;
    }
    
    /* Better form spacing */
    form > div {
        margin-bottom: 1rem;
    }
}

/* Improve readability on small screens */
@media (max-width: 375px) {
    h1 {
        font-size: 1.5rem;
    }
    
    h2 {
        font-size: 1.25rem;
    }
    
    .text-sm {
        font-size: 0.875rem;
    }
}

/* Optimize for tablets */
@media (min-width: 640px) and (max-width: 1024px) {
    .container {
        padding: 1.5rem;
    }
}

/* Time picker styling - custom dropdown with clear AM/PM */
select.bhajan-time {
    min-width: 160px;
    font-size: 1rem;
    cursor: pointer;
}

select.bhajan-time option {
    padding: 0.75rem;
    font-size: 1rem;
    font-weight: 500;
}

/* Ensure both selects are equal size */
select.bhajan-day,
select.bhajan-time {
    flex: 1;
    width: 100%;
}

@media (min-width: 640px) {
    select.bhajan-day,
    select.bhajan-time {
        min-width: 180px;
    }
}

/* Style for better readability */
select.bhajan-time option:first-child {
    font-weight: 600;
    color: #6B7280;
}

