:root {
    --primary-color: #1e3a8a;
    --secondary-color: #3b82f6;
    --accent-color: #38bdf8;
    --light-bg: #f8fafc;
    --dark-text: #1e293b;
    --light-text: #ffffff;
    --border-color: #e2e8f0;
}

body {
    font-family: 'Roboto', 'Poppins', sans-serif;
    background-color: var(--light-bg);
    color: var(--dark-text);
    margin: 0; /* Ensure no default margin */
    line-height: 1.5; /* Improve readability */
}

.arabic {
    font-family: 'Amiri', serif;
    direction: rtl;
    font-size: 1rem; /* Consistent font size for Arabic text */
}

.prayer-time-card, .prayer-card {
    background-color: white;
    border-radius: 0.5rem;
    min-height: 100px; /* Prevent cards from collapsing on mobile */
}


.active-prayer {
    border-left: 4px solid #10B981;
    background-color: rgba(16, 185, 129, 0.1);
}

.countdown-timer, .countdown {
    color: var(--primary-color);
    font-weight: bold;
    font-feature-settings: "tnum";
    font-variant-numeric: tabular-nums;
    font-size: 1.125rem; /* Slightly smaller for mobile */
}

.city-selector {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    display: none;
    position: absolute;
    z-index: 10;
    width: 100%;
    background-color: white;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}


.city-selector a {
    width: 100%;
    padding: 0.75rem;
    font-size: 0.875rem; /* Smaller font for mobile */
    color: var(--dark-text);
    text-decoration: none;
}

.city-selector a:hover {
    background-color: var(--border-color);
}

.method-selector {
    background-color: white;
    border: 1px solid #E5E7EB;
    border-radius: 0.375rem;
    padding: 0.5rem;
}

.method-selector select {
    width: 100%;
    font-size: 0.875rem; /* Smaller font for mobile */
}

.hijri-date {
    font-weight: 500;
    color: #4B5563;
    font-size: 1rem; /* Adjust for mobile */
}

.gregorian-date {
    color: #6B7280;
    font-size: 0.875rem; /* Smaller for mobile */
}

.rtl-support {
    direction: ltr;
}

[dir="rtl"] .rtl-support {
    direction: rtl;
}



/* Ensure tables are scrollable on mobile */
.overflow-x-auto {
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
}

/* Responsive table styles */
table {
    font-size: 0.875rem; /* Default font size */
    width: 100%;
}

th, td {
    padding: 0.75rem; /* Default padding */
    text-align: center;
}

th {
    font-size: 0.75rem; /* Smaller headers */
    text-transform: uppercase;
}

/* Search input and buttons */
.search-box, button {
    min-height: 44px; /* Touch-friendly size */
    font-size: 0.875rem; /* Smaller for mobile */
}

button, a.button {
    min-width: 44px; /* Touch-friendly width */
    min-height: 44px;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* Pagination */
.pagination a {
    background-color: var(--border-color);
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    text-decoration: none;
    font-size: 0.875rem;
}

.pagination a:hover {
    background-color: #cbd5e1;
}

.pagination .current {
    background-color: var(--primary-color);
    color: var(--light-text);
}

/* Mobile-specific adjustments */
@media (max-width: 640px) {
    .prayer-time-card, .prayer-card {
        padding: 0.75rem; /* Smaller padding on mobile */
    }

    .countdown-timer, .countdown {
        font-size: 1rem; /* Even smaller for mobile */
    }

    table {
        font-size: 0.75rem; /* Smaller font for tables */
    }

    th, td {
        padding: 0.5rem; /* Reduced padding */
    }

    .method-selector select {
        font-size: 0.75rem; /* Smaller select font */
    }

    .hijri-date {
        font-size: 0.875rem;
    }

    .gregorian-date {
        font-size: 0.75rem;
    }

    button, a.button {
        width: 100%; /* Full-width buttons on mobile */
    }
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
    :root {
        --light-bg: #1e293b;
        --dark-text: #f8fafc;
        --border-color: #334155;
    }

    body {
        background-color: var(--light-bg);
        color: var(--dark-text);
    }

    .prayer-time-card, .prayer-card {
        background-color: #334155;
    }

    .city-selector {
        background-color: #334155;
        border-color: var(--border-color);
    }

    .method-selector {
        background-color: #334155;
        border-color: var(--border-color);
    }

    footer {
        background-color: #0f172a;
    }

    .dark .bg-white {
        background-color: #334155;
        color: #f8fafc;
    }

    .dark .text-gray-600 {
        color: #d1d5db;
    }

    .dark .text-gray-500 {
        color: #9ca3af;
    }
}




/* Target the specific div for location and calculation method */
.location-calculation {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    background-color: white;
    border-radius: 0.5rem;
}

.location-calculation > div {
    width: 100%;
    margin-bottom: 1rem;
}

.location-calculation .selected-location,
.location-calculation .calculation-method {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.location-calculation .selected-location span,
.location-calculation .calculation-method span {
    color: #4b5563;
    font-size: 0.875rem;
}

.location-calculation .selected-location #selectedCity {
    color: #1e3a8a;
    font-weight: 500;
    font-size: 1rem;
}

.location-calculation select {
    border: 1px solid #e2e8f0;
    border-radius: 0.25rem;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    background-color: white;
    color: #1e293b;
    width: 100%;
    max-width: 250px;

}

.location-calculation select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

/* Responsive adjustments for mobile (max-width: 640px) */
@media (max-width: 640px) {
    .location-calculation {
        padding: 0.75rem;
    }

    .location-calculation > div {
        margin-bottom: 0.75rem;
    }

    .location-calculation .selected-location,
    .location-calculation .calculation-method {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }

    .location-calculation .selected-location span,
    .location-calculation .calculation-method span {
        margin-bottom: 0.25rem;
    }

    .location-calculation select {
        max-width: 100%;
        width: 100%;
    }
}

/* Dark mode adjustments */
@media (prefers-color-scheme: dark) {
    .location-calculation {
        background-color: #1e293b;
    }

    .location-calculation .selected-location span,
    .location-calculation .calculation-method span {
        color: #d1d5db;
    }

    .location-calculation .selected-location #selectedCity {
        color: #38bdf8;
    }

    .location-calculation select {
        background-color: #2a3446;
        border-color: #334155;
        color: #f8fafc;
    }

    .location-calculation select:focus {
        border-color: #60a5fa;
        box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.2);
    }
}



/* Add to assets/css/styles.css */
@media (max-width: 768px) {
    .prayer-time-card, .prayer-card {
        padding: 1rem;
        margin-bottom: 0.5rem;
    }
    
    .grid.grid-cols-1.md\\:grid-cols-3.lg\\:grid-cols-6 {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
    
    .countdown-timer {
        font-size: 1.25rem;
    }
}

