﻿/*--------------------------------------------------------------
# General
--------------------------------------------------------------*/
html, body, .body-content {
    height: 100%;
    box-sizing: border-box;
    font-family: 'Numans', sans-serif;
    margin: 0;
    padding-left: 5px;
    padding-right: 5px;
}

a {
    color: #5777ba;
}

    a:hover {
        color: #7b94c9;
        text-decoration: none;
    }

h1, h2, h3, h4, h5, h6 {
    font-family: 'Numans', sans-serif;
}

.cls_test {
    font-size: 1em;
}

/* Prayer Table */
.tblPrayers {
    border: none; 
    width: 100%;
    height:100%;
    table-layout: fixed;
    font-weight: bold;

}
    

    .tblPrayers th {
        background-color: black;
        color: white;
        vertical-align: middle;
        text-align: center;
    }

    .tblPrayers td {
        background-color: saddlebrown;
        color: white;
        vertical-align: middle;
        text-align: center;
        font-weight: bold;
    }

        .tblPrayers td .tomorrow-prayer {
            display: block !important;
            font-size: 50% !important;
            color: white !important;
            font-weight: bold !important;
        }

/* Slider */
.div_Slider, .auto-slider, #div_SliderImages {
    width: 100%;
    height: 100%;
    max-height: 100vh;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column; /* stack slider + table */
}

.imgSlider_Item, .imgSlider_Tester {
    width: 100%;
    height: 100%;
    object-fit: fill;
    object-position: center center;
    flex-shrink: 0;
    display: block;
}

/* Current Prayer panel - shown in place of the slider during the before/after-Iqama window
   (see updateCurrentPrayerPanel() in HomePage.js). Card design supplied by ticket #657.
   Sized with clamp(rem, vh, rem) rather than plain vh so it both fills a TV screen
   impressively (large preferred vh value) and never overflows a short/narrow viewport
   (rem floor/ceiling), regardless of how wide the slider column happens to be. */
.div_CurrentPrayer {
    --cp-primary-green: #0d7a42;
    --cp-primary-green-light: #129d55;
    --cp-accent-gold: #d97706;
    --cp-text-main: #1f2937;
    --cp-text-muted: #6b7280;
    --cp-shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);

    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    padding: 2vh 2vw;
}

.cp-card {
    box-sizing: border-box;
    width: min(96%, 1600px);
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.04);
    border-radius: clamp(16px, 3vh, 32px);
    box-shadow: 1px 1px 10px 5px #888888;
    padding: clamp(20px, 4vh, 56px) clamp(18px, 4vw, 64px);
    text-align: center;
}

.cp-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: clamp(10px, 2vw, 24px);
    margin-bottom: clamp(16px, 3vh, 40px);
    padding-bottom: clamp(12px, 2vh, 28px);
    border-bottom: 2px solid #f0f4f2;
}

.cp-title-en {
    font-size: clamp(2rem, min(9vh, 12vw), 5.5rem);
    font-weight: 800;
    color: var(--cp-primary-green);
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.cp-divider {
    font-size: clamp(1.5rem, min(6vh, 8vw), 3.5rem);
    color: #d1d5db;
    font-weight: 300;
}

.cp-title-ar {
    font-family: 'Amiri', serif;
    font-size: clamp(2.25rem, min(10vh, 13vw), 6rem);
    font-weight: 700;
    color: var(--cp-primary-green);
    line-height: 1.1;
}

.cp-timings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(10px, 2vh, 28px);
    margin-bottom: clamp(16px, 3vh, 40px);
}

.cp-time-card {
    background-color: #fafbfc;
    border: 1px solid #eaeeeb;
    border-radius: clamp(10px, 2vh, 24px);
    padding: clamp(14px, 3vh, 32px) clamp(10px, 2vw, 24px);
}

.cp-time-label {
    font-size: clamp(0.8rem, min(2.4vh, 3.2vw), 1.6rem);
    font-weight: 600;
    color: var(--cp-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: clamp(6px, 1vh, 14px);
}

.cp-time-value {
    font-size: clamp(1.75rem, min(7vh, 9vw), 4.5rem);
    font-weight: 800;
    color: var(--cp-text-main);
    line-height: 1.1;
}

#div_TimeRemaining.cp-countdown {
    background: linear-gradient(135deg, var(--cp-primary-green), var(--cp-primary-green-light));
    color: #ffffff;
    border-radius: clamp(12px, 2.5vh, 28px);
    padding: clamp(14px, 3vh, 32px);
    box-shadow: 0 8px 20px rgba(13, 122, 66, 0.25);
    position: relative;
    overflow: hidden;
}

    #div_TimeRemaining.cp-countdown::before {
        content: '';
        position: absolute;
        top: -50%;
        left: -50%;
        width: 200%;
        height: 200%;
        background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, rgba(255,255,255,0) 70%);
        pointer-events: none;
    }

.cp-countdown-label {
    font-size: clamp(0.75rem, min(2vh, 2.6vw), 1.4rem);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0.9;
    margin-bottom: clamp(4px, 1vh, 10px);
    position: relative;
}

.cp-countdown-timer {
    font-size: clamp(2rem, min(8vh, 10vw), 5rem);
    font-weight: 800;
    letter-spacing: 0.02em;
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
    position: relative;
}

@media (max-width: 480px) {
    .cp-card {
        padding: 18px 14px;
    }
    .cp-timings-grid {
        grid-template-columns: 1fr;
    }
}

/* Prayer times container */
.div_PrayerTimes {
    width: 100%;
    max-width: 1100px; /* keeps table from overflowing ultra-wide screens */
    margin: 0 auto;
    padding: 10px 0;
    font-size: 2em;
    background-color: rgba(0,0,0,0.4);
    text-align: center;
    box-sizing: border-box;
    flex-shrink: 0; /* stays visible */
}

/* Analogue Clock */
#analogueclock {
    text-align: center;
}

/* Current Time / Prayer Name */
#sp_CurrentTime {
    font-size: 3.90em;
    font-weight: bold;
    text-align: left;
    margin-right: 1px;
   /* padding-right: 100px;*/
}

#sp_PrayerName {
    font-size: 4em;
    font-weight: bold;
}

.div_CurrentDate {
    display: flex;
    align-items: center;
    justify-content: space-around;
}

#sp_CurrentDate {
    font-size: 3.50em;
    font-weight: bold;
}

.cls_Marquee1 {
    font-size: 5em;
    font-weight: bolder;
    margin-top: 30px;
}

/* Ramadan Slider/Table */
.ramadan-slider {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 2vw;
}

.ramadan-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.ramadan-table {
    width: 100%;
    height: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

    .ramadan-table tr {
        height: calc(100% / 16);
    }

    .ramadan-table td,
    .ramadan-table th {
        padding: 0;
        vertical-align: middle;
    }

/* PrayerTime Found Highlight */
.PrayerTime_Found th,
.PrayerTime_Found td {
    background-color: green;
    color: white;
}

/* Container */
.container-fluid {
    padding: unset;
    width: 98%;
}

/* Misc */
.alert {
    margin-bottom: unset;
}

.img_Masjid_Logo {
    width: 100px;
    height: 100px;
    border-radius: 30px;
}

#sp_PrayerImage {
    position: fixed;
    width: 100%;
    height: 80%;
    object-fit: contain;
    z-index: -1;
}

/* Digital and Analogue Clock styling */
.div_time {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
}

/* -------------------- Media Queries -------------------- */

/*Mobile Screen*/
@media all and (min-width: 350px) and (max-width: 650px) {

    html, body, .body-content {
        /*    background-color: red;*/
        padding-left: 0px;
        padding-right: 0px;
    }

    #sp_CurrentDate {
        font-size: 1.50em;
        font-weight: bold;
    }

    #sp_CurrentTime {
        font-size: 2.50em;
        font-weight: bold;
        text-align: center;
        margin-right: 1px;
        /* padding-right: 100px;*/
    }

    /* Image slider is decorative/TV-only - hide it on phones, but keep .div_Slider itself
       visible so the Current Prayer card (its child, toggled independently by
       updateCurrentPrayerPanel() in HomePage.js) can still show during the Iqama window. */
    #div_SliderImages {
        display: none !important; /* wins over the inline style="display:block" jQuery's .show() sets */
    }

    .div_Slider {
        height: auto;
        max-height: none;
        min-height: 0;
    }

    .div_CurrentPrayer {
        height: auto;
        padding: 12px 8px;
    }

    .cp-card {
        width: 100%;
    }

    .ramadan-slider {
        flex-direction: column !important;
        height: auto !important;
        gap: 20px;
        padding: 10px;
    }

    .ramadan-table {
        width: 100% !important;
        table-layout: auto;
    }

        .ramadan-table td,
        .ramadan-table th {
            font-size: 1.5vh !important;
            padding: 5px 2px;
        }

    .div_PrayerTimes, .tblPrayers {
        height: auto !important;
        font-size: 1.1em !important;
    }

    .cls_Marquee1 {
        font-size: 3em !important;
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        margin: 0 !important;
        text-align: center;
        background-color: black;
        z-index: 1000;
    }
}


/* Small screens */
@media all and (min-width: 651px) and (max-width: 1380px){
    .div_PrayerTimes, .tblPrayers {
        font-size: 1.30em !important;
    }

    .div_Slider, .auto-slider, .div_PrayerTimes, .tblPrayers, #div_SliderImages, .imgSlider_Tester {
        height: 100vh !important;
    }

    .cls_Marquee1 {
        font-size: 5em;
        margin-top: 55px;
    }

    .ramadan-slider {
        height: 80vh;
        gap: 1vw;
    }

    .ramadan-table td,
    .ramadan-table th {
        font-size: 2.530vh;
    }
}

/* Tablet portrait */
@media screen and (min-width: 768px) and (max-width: 1100px) and (orientation: portrait) {
    
    .div_Slider,
    .auto-slider,
    .div_PrayerTimes,
    .tblPrayers {
        height: 75vh !important;
    }

    .ramadan-slider {
        height: 80vh !important;
        flex-direction: column;
    }

    .ramadan-table td,
    .ramadan-table th {
        font-size: 1.6vh !important;
    }
}

/* 15 inch Screen*/
@media screen and (min-width: 1101px) and (max-width: 1380px) {

   /* body{
        background-color:yellow;
    }*/

    .div_PrayerTimes, .tblPrayers {
        font-size: 1.20em !important;
    }

    .div_Slider, .auto-slider, .div_PrayerTimes, .tblPrayers, #div_SliderImages, .imgSlider_Tester {
        height: 80vh !important;
    }

    .ramadan-slider {
        height: 78vh !important;
        flex-direction: column;
    }

    .ramadan-table td,
    .ramadan-table th {
        font-size: 1.6vh !important;
    }

    .cls_Marquee1 {
        font-size: 4em;
        margin-top: 0px;
    }
}

/* 17 inch Screen*/
@media screen and (min-width: 1381px) and (max-width: 1700px) {

   /* body {
        background-color: yellow;
    }*/

    .div_PrayerTimes, .tblPrayers {
        font-size: 1.30em !important;
    }

    .div_Slider, .auto-slider, .div_PrayerTimes, .tblPrayers, #div_SliderImages, .imgSlider_Tester {
        height: 75vh !important;
    }

    .ramadan-slider {
        height: 75vh !important;
        flex-direction: column;
    }

    .ramadan-table td,
    .ramadan-table th {
        font-size: 1.6vh !important;
    }

    .cls_Marquee1 {
        font-size: 4em;
        margin-top: 10px;
    }
}

/* Large screens */
@media all and (min-width: 1701px) and (max-width: 1920px) {
    .div_PrayerTimes, .tblPrayers {
        font-size: 1.50em !important;
    }

    .div_Slider, .auto-slider, .div_PrayerTimes, .tblPrayers, #div_SliderImages, .imgSlider_Tester {
        height: 85vh !important;
    }

    .cls_Marquee1 {
        font-size: 5em;
        margin-top: 30px;
    }

    .ramadan-slider {
        height: 75vh;
        gap: 1vw;
    }

    .ramadan-table td, .ramadan-table th {
        font-size: 1.8vh;
    }
}

/* Extra large screens */
@media all and (min-width: 1921px) and (max-width: 2499px) {
    .div_PrayerTimes, .tblPrayers {
        font-size: 1.90em !important;
    }

    .div_Slider, .auto-slider, .div_PrayerTimes, .tblPrayers, #div_SliderImages, .imgSlider_Tester {
        height: 820px !important;
    }

    .ramadan-slider {
        height: 70vh;
        gap: 1.5vw;
    }

    .ramadan-table td, .ramadan-table th {
        font-size: 2vh;
    }
}

/* Ultra-wide screens: full 100vh, slider + table stacked */
@media all and (min-width: 2500px) {

   /*  body {
		background-color: yellow;
	}*/

    #sp_CurrentTime {
        font-size: 3.45em;
        margin-right: 0px !important;
    }
    .div_time_date {
        font-size: 2.30em !important;
    }

    .div_PrayerTimes, .tblPrayers {
        font-size: 1.90em !important;
    }

    .div_Slider, .auto-slider, .div_PrayerTimes, .tblPrayers {
        height: 81vh !important;
    }
    #div_SliderImages, .imgSlider_Tester {
        height: 81vh !important;
    }

    #div_SliderImages_Fullscreen, .imgSlider_Tester_Fullscreen {
        height: 100vh !important;
    }
    /*.imgSlider_Tester {
		width: 1190px;
	}*/
    .container-fluid {
        padding: unset;
        width: 98%;
    }

    .imgSlider_Item, .imgSlider_Tester {
        height: auto;
        max-height: calc(100vh - 10px); /* leaves room for table */
        object-fit: contain;
        margin-top: 0.2%;
    }

    .ramadan-slider {
        height: 81vh;
        gap: 2vw;
    }

    .ramadan-table td, .ramadan-table th {
        font-size: 3.6vh;
    }

    .cls_Marquee1 {
        font-size: 5em;
       /* margin-top: 125px;*/
    }
}

/*4K Screen*/
@media all and (min-width: 3800px) {

 /*   body {
		background-color: red;
	}*/

    .div_PrayerTimes, .tblPrayers {
        font-size: 2.30em !important;
    }

    .div_Slider, .auto-slider, .div_PrayerTimes, .tblPrayers {
        height: 86vh !important;
    }

    #div_SliderImages, .imgSlider_Tester {
        height: 86vh !important;
    }
}


