/**
 * Prayer Times Plugin Styles - Beautiful Arabic UI
 * Green theme with Islamic design elements
 */

@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@400;500;700&display=swap');

/* Global Styles */
* {
    box-sizing: border-box;
}

/* Main Container */
.prayer-times-container {
    direction: rtl;
    text-align: center;
    font-family: 'Tajawal', 'Tahoma', Arial, sans-serif;
    max-width: 1200px;
    margin: 20px auto;
    padding: 0;
    background: #ffffff;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    overflow: hidden;
    color: #2c3e50;
}

/* Header Section */
.prayer-times-header {
    background: linear-gradient(135deg, #ffffff, #f8f9fa);
    padding: 30px 20px 20px;
    border-bottom: 1px solid #e9ecef;
}

.prayer-times-title {
    font-size: 2.2rem;
    font-weight: 700;
    margin: 0 0 10px 0;
    color: #2c3e50;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.location-info {
    font-size: 1.2rem;
    color: #7f8c8d;
    margin: 0;
    font-weight: 500;
}

/* Next Prayer Banner - Green Theme - Matching User's Image */
.next-prayer-banner {
    background: linear-gradient(135deg, #2E7D32, #388E3C);
    color: white;
    padding: 30px 20px;
    position: relative;
    overflow: hidden;
    text-align: center;
    border-radius: 0;
}

.next-prayer-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 20"><defs><pattern id="stars" x="0" y="0" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="1" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="20" fill="url(%23stars)"/></svg>');
    pointer-events: none;
}

/* Prayer name at top */
.countdown-prayer-name {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 15px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
    position: relative;
    z-index: 1;
}

/* Large countdown timer in center */
.countdown-timer {
    font-size: 4rem;
    font-weight: 700;
    font-family: 'Courier New', monospace;
    letter-spacing: 3px;
    text-shadow: 0 3px 6px rgba(0,0,0,0.3);
    animation: pulse 2s ease-in-out infinite;
    margin: 10px 0;
    position: relative;
    z-index: 1;
}

/* Label below countdown */
.countdown-label {
    font-size: 1.1rem;
    margin-top: 15px;
    opacity: 0.95;
    position: relative;
    z-index: 1;
}

@keyframes pulse {
    0%, 100% { 
        transform: scale(1);
        opacity: 1;
    }
    50% { 
        transform: scale(1.02);
        opacity: 0.95;
    }
}

/* Current Time Section */
.current-time-section {
    background: #f8f9fa;
    padding: 20px;
    border-bottom: 1px solid #e9ecef;
}

.current-time-label {
    font-size: 1.1rem;
    color: #6c757d;
    margin-bottom: 8px;
    font-weight: 500;
}

.current-time-display {
    font-size: 2rem;
    font-weight: 700;
    color: #2E7D32;
    font-family: 'Courier New', monospace;
    letter-spacing: 1px;
}

/* Prayer Times Grid */
.prayer-times-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0;
    background: #ffffff;
}

.calendar-title{
	color:white;
}

/* Prayer Cards */
.prayer-card {
    background: #ffffff;
    border-right: 1px solid #e9ecef;
    padding: 25px 15px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    min-height: 140px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.prayer-card:last-child {
    border-right: none;
}

.prayer-card:hover {
    background: #f8f9fa;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(46, 125, 50, 0.15);
}

/* Current Prayer Highlighting - Gold Theme */
.prayer-card.current-prayer {
    background: linear-gradient(135deg, #FFF8E1, #FFF3C4);
    border-color: #FFB300;
    position: relative;
}

.prayer-card.current-prayer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #FFB300, #FFA000);
}

.prayer-card.current-prayer .prayer-name {
    color: #E65100;
    font-weight: 700;
}

.prayer-card.current-prayer .prayer-time {
    color: #E65100;
    font-weight: 700;
}

/* Active Period Enhancement - Subtle visual effect for current prayer */
.prayer-card.active-period {
    animation: gentle-pulse 3s ease-in-out infinite;
    box-shadow: 0 4px 20px rgba(255, 179, 0, 0.2);
}

@keyframes gentle-pulse {
    0%, 100% { 
        box-shadow: 0 4px 20px rgba(255, 179, 0, 0.2);
        transform: scale(1);
    }
    50% { 
        box-shadow: 0 6px 25px rgba(255, 179, 0, 0.3);
        transform: scale(1.01);
    }
}

/* Prayer Icon */
.prayer-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
    line-height: 1;
}

.prayer-card.current-prayer .prayer-icon {
    filter: drop-shadow(0 2px 6px rgba(230, 81, 0, 0.3));
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from { transform: scale(1); }
    to { transform: scale(1.1); }
}

/* Prayer Name */
.prayer-name {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 8px 0;
    color: #2c3e50;
    line-height: 1.3;
}

/* Prayer Time */
.prayer-time {
    font-size: 1.4rem;
    font-weight: 700;
    color: #2E7D32;
    font-family: 'Courier New', monospace;
    letter-spacing: 1px;
    margin: 5px 0;
}

/* Cities Section */
.cities-section {
    margin: 30px 0;
    background: #ffffff;
    direction: rtl;
    text-align: right;
}

.cities-header {
    background: linear-gradient(135deg, #2E7D32, #388E3C);
    color: white;
    padding: 20px;
}

.cities-title {
    font-size: 1.6rem;
    font-weight: 600;
    margin: 0;
}

.cities-table-container {
    overflow-x: auto;
    direction: rtl;
}

.cities-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.95rem;
    direction: rtl;
    text-align: right;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    overflow: hidden;
}

.cities-table th {
    background: #f8f9fa;
    color: #495057;
    font-weight: 600;
    padding: 15px 12px;
    text-align: center;
    border-bottom: 2px solid #dee2e6;
    border-right: 1px solid #dee2e6;
    position: sticky;
    top: 0;
}

.cities-table th.city-column {
    text-align: right;
    width: 150px;
}

.cities-table th.prayer-column {
    width: 80px;
}

.cities-table th:last-child {
    border-right: none;
}

.cities-table td {
    padding: 12px;
    border-bottom: 1px solid #dee2e6;
    border-right: 1px solid #dee2e6;
    text-align: center;
}

.cities-table td:last-child {
    border-right: none;
}

.cities-table td.city-name {
    text-align: right;
    font-weight: 600;
}

.cities-table td.prayer-time {
    font-family: 'Courier New', monospace;
    font-weight: 600;
    color: #2E7D32;
}

/* Highlight current prayer in cities table */
.cities-table td.current-prayer-cell {
    background: linear-gradient(135deg, #FFF8E1, #FFF3C4);
    color: #E65100;
    font-weight: 700;
    border: 2px solid #FFB300;
    position: relative;
}

.cities-table td.current-prayer-cell::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #FFB300, #FFA000);
}

.capital-badge {
    display: inline-block;
    background: #28a745;
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 10px;
    margin-right: 5px;
    font-weight: 500;
}

.city-row:hover {
    background: #f8f9fa;
}

.error-cell {
    color: #dc3545;
    font-style: italic;
}

/* Monthly Calendar Section */
.monthly-calendar-section {
    margin: 30px 0;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    overflow: hidden;
    direction: rtl;
    text-align: right;
}

.calendar-header {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.calendar-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}

.cities-title{
	color:#ffffff;
}

/* Calendar toggle styles removed - calendar is now always visible */

.calendar-content {
    /* Calendar is now always visible */
}

.calendar-table-container {
    overflow-x: auto;
    direction: rtl;
}

.calendar-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    direction: rtl;
    text-align: right;
}

.calendar-table th {
    background: #f8f9fa;
    color: #495057;
    font-weight: 600;
    padding: 12px 8px;
    text-align: center;
    border-bottom: 2px solid #dee2e6;
}

.calendar-table th.day-column {
    width: 80px;
}

.calendar-table th.prayer-column {
    width: 70px;
}

.calendar-table td {
    padding: 8px;
	border-right: 1px solid #000000;
    border-bottom: 1px solid #000000;
    text-align: center;
}

.calendar-row.today {
    background: linear-gradient(135deg, #e8f5e8, #d4edd4);
}

.calendar-row.today .day-number {
    color: #2E7D32;
    font-weight: 700;
}

.day-number {
    font-weight: 600;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.today-badge {
    background: #2E7D32;
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 10px;
    margin-right: 5px;
}

.calendar-table td.prayer-time {
    font-family: 'Courier New', monospace;
    font-weight: 600;
    color: #2E7D32;
    font-size: 0.85rem;
	border: 1px solid #000000;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .prayer-times-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .prayer-card {
        border-right: 1px solid #e9ecef;
        border-bottom: 1px solid #e9ecef;
    }
    
    .prayer-card:nth-child(3n) {
        border-right: none;
    }
}

@media (max-width: 768px) {
    .prayer-times-container {
        margin: 10px;
        border-radius: 10px;
    }
    
    .prayer-times-title {
        font-size: 1.8rem;
    }
    
    .location-info {
        font-size: 1rem;
    }
    
    .next-prayer-banner {
        padding: 20px 15px;
    }
    
    .countdown-prayer-name {
        font-size: 1.8rem;
    }
    
    .countdown-timer {
        font-size: 3rem;
        letter-spacing: 2px;
    }
    
    .current-time-display {
        font-size: 1.6rem;
    }
    
    .prayer-times-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .prayer-card {
        padding: 20px 10px;
        min-height: 120px;
    }
    
    .prayer-card:nth-child(2n) {
        border-right: none;
    }
    
    .prayer-icon {
        font-size: 2rem;
    }
    
    .prayer-name {
        font-size: 1rem;
    }
    
    .prayer-time {
        font-size: 1.2rem;
    }
    
    .calendar-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .cities-table-container,
    .calendar-table-container {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .prayer-times-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .prayer-card {
        padding: 15px 8px;
        min-height: 100px;
    }
    
    .prayer-icon {
        font-size: 1.8rem;
        margin-bottom: 5px;
    }
    
    .prayer-name {
        font-size: 0.9rem;
        margin: 4px 0;
    }
    
    .prayer-time {
        font-size: 1.1rem;
    }
    
    .countdown-timer {
        font-size: 2.5rem;
        letter-spacing: 1px;
    }
    
    .cities-table th,
    .cities-table td,
    .calendar-table th,
    .calendar-table td {
        padding: 8px 2px;
        font-size: 0.8rem;
    }
}

/* Loading States */
.prayer-times-container.loading {
    opacity: 0.7;
    pointer-events: none;
}

.prayer-times-container.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #2E7D32;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 1000;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Accessibility */
.prayer-times-container:focus-within {
    outline: 2px solid #2E7D32;
    outline-offset: 2px;
}

.prayer-card:focus {
    outline: 2px solid #2E7D32;
    outline-offset: -2px;
}

/* Print Styles */
@media print {
    .prayer-times-container {
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .next-prayer-banner,
    /* Calendar toggle removed */
    
    .countdown-timer {
        animation: none;
    }
    
    .prayer-card.current-prayer {
        background: #f5f5f5 !important;
    }
}