/* Prayer Times Ultimate Frontend Styles */

.prayer-times-container {
    max-width: 1200px;
    margin: 0 auto;
    font-size: 14px;
    line-height: 1.4;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Table Styles */
.prayer-times-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1em 0;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.prayer-times-table th,
.prayer-times-table td {
    padding: 8px 12px;
    text-align: center;
    border: 1px solid #e0e0e0;
}

.prayer-times-table th {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
}

.prayer-times-table td {
    font-size: 13px;
}

.prayer-date {
    font-weight: 500;
    margin-bottom: 2px;
}

.hijri-date {
    font-size: 12px;
    color: #666;
}

.jummah-day {
    display: inline-block;
    font-size: 11px;
    background: #4CAF50;
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    margin-left: 5px;
}

/* Predefined Color Themes */
/* Classic Blue */
.theme-classic-blue th {
    background: #1a237e;
    color: #fff;
}
.theme-classic-blue tr:nth-child(even) {
    background: #f5f7ff;
}
.theme-classic-blue .jummah-day {
    background: #303f9f;
}

/* Forest Green */
.theme-forest-green th {
    background: #2e7d32;
    color: #fff;
}
.theme-forest-green tr:nth-child(even) {
    background: #f1f8e9;
}
.theme-forest-green .jummah-day {
    background: #388e3c;
}

/* Desert Sand */
.theme-desert-sand th {
    background: #8d6e63;
    color: #fff;
}
.theme-desert-sand tr:nth-child(even) {
    background: #f5f5f5;
}
.theme-desert-sand .jummah-day {
    background: #795548;
}

/* Nordic Blue */
.theme-nordic-blue th {
    background: #0277bd;
    color: #fff;
}
.theme-nordic-blue tr:nth-child(even) {
    background: #e1f5fe;
}
.theme-nordic-blue .jummah-day {
    background: #0288d1;
}

/* Dark Theme */
.theme-dark {
    background: #212121;
    color: #fff;
}
.theme-dark .prayer-times-table {
    background: #1a1a1a;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
.theme-dark th {
    background: #000;
    color: #fff;
    border-color: #333;
}
.theme-dark td {
    border-color: #333;
    color: #eee;
}
.theme-dark .hijri-date {
    color: #999;
}
.theme-dark tr:nth-child(even) {
    background: #262626;
}

/* Month Selector Styles */
.month-selector {
    margin-bottom: 1em;
    display: flex;
    gap: 10px;
    align-items: center;
}

.month-select,
.year-select {
    padding: 6px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.update-monthly-table {
    padding: 6px 16px;
    background: #1976d2;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.update-monthly-table:hover {
    background: #1565c0;
}

/* Next Prayer Highlight */
.prayer-time.next-prayer {
    font-weight: 600;
    color: #1976d2;
}

.theme-dark .prayer-time.next-prayer {
    color: #64b5f6;
}

/* Monthly Table */
.monthly-table {
    font-size: 0.9em;
}

.monthly-table th {
    position: sticky;
    top: 0;
    z-index: 10;
}

/* Next Prayer Widget */
.next-prayer-widget {
    background: #fff;
    padding: 15px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.next-prayer-widget h3 {
    margin: 0 0 10px 0;
    color: #2c3e50;
}

.next-prayer-widget .time {
    font-size: 1.5em;
    font-weight: 600;
    color: #e67e22;
}

.next-prayer-widget .countdown {
    color: #666;
    font-size: 0.9em;
    margin-top: 5px;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .prayer-times-container {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .prayer-times-table {
        min-width: 800px; /* Ensures table remains readable on small screens */
    }

    .prayer-times-table th,
    .prayer-times-table td {
        white-space: nowrap;
        padding: 6px 8px;
    }

    .monthly-table {
        font-size: 0.8em;
    }

    .prayer-date {
        font-size: 1em;
    }

    .prayer-time {
        font-size: 1em;
    }

    /* Stack layout for very small screens */
    @media screen and (max-width: 480px) {
        .prayer-times-table,
        .prayer-times-table thead,
        .prayer-times-table tbody,
        .prayer-times-table th,
        .prayer-times-table td,
        .prayer-times-table tr {
            display: block;
        }

        .prayer-times-table thead tr {
            position: absolute;
            top: -9999px;
            left: -9999px;
        }

        .prayer-times-table tr {
            margin-bottom: 15px;
            border: 1px solid #e2e8f0;
        }

        .prayer-times-table td {
            border: none;
            position: relative;
            padding-left: 50%;
        }

        .prayer-times-table td:before {
            position: absolute;
            top: 8px;
            left: 8px;
            width: 45%;
            padding-right: 10px;
            white-space: nowrap;
            font-weight: 600;
        }

        /* Add labels */
        .prayer-times-table td:nth-of-type(1):before { content: "Date"; }
        .prayer-times-table td:nth-of-type(2):before { content: "Fajr"; }
        .prayer-times-table td:nth-of-type(3):before { content: "Sunrise"; }
        .prayer-times-table td:nth-of-type(4):before { content: "Dhuhr"; }
        .prayer-times-table td:nth-of-type(5):before { content: "Asr"; }
        .prayer-times-table td:nth-of-type(6):before { content: "Maghrib"; }
        .prayer-times-table td:nth-of-type(7):before { content: "Isha"; }
    }
}

/* Print Styles */
@media print {
    .prayer-times-container {
        max-width: none;
    }

    .prayer-times-table {
        box-shadow: none;
        border: 1px solid #000;
    }

    .prayer-times-table th,
    .prayer-times-table td {
        border-color: #000;
    }

    .month-selector {
        display: none;
    }

    .jummah-day {
        border: 1px solid #000;
    }
}
