body {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    color: #333333;
    margin: 0;
}
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
}


.landing-page-h1 {
    font-size: 1.5rem;
    line-height: 1.2;
}



/* Responsive form and layout helpers */
.container {
    max-width: 980px;
    margin: 0 auto;
    padding: 24px;
}

.form-card {
    background: #fff;
    border: 1px solid #e6e6e6;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}
.landing-page-h1 {
    text-align: center;
}

label { display:block; margin:12px 0px; font-weight:600; }
input[type="text"], input[type="email"], input[type="password"], input[type="tel"], select, textarea {
    width:100%; padding:10px 12px; border:1px solid #ddd; border-radius:6px; font-size:0.9375rem; box-sizing:border-box;
}

button { background:#0d724e; color:#fff; border:none; padding:10px 16px; border-radius:6px; cursor:pointer; font-weight:700; }
button.secondary { background:#f3f4f6; color:#111; }

.muted { color:#666; }
.mobile-br { display: none; }
@media(max-width:640px){
    .mobile-br { display: inline; }
}



/* Simple header/footer spacing */
header, footer{ padding:0; }
.auth{ max-width:720px; margin:24px auto; }

/* Modal styles */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(11, 23, 39, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    z-index: 200;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.modal:not([hidden]) {
    opacity: 1;
    visibility: visible;
}
.modal[hidden] { display:flex !important; pointer-events: none; } /* Override display:none to allow transition, but hide via opacity */

body.modal-open { overflow:hidden; }

.modal-content {
    width: min(100%, 420px);
    background: #ffffff;
    border-radius: 1rem;
    box-shadow: 0 18px 38px rgba(11, 23, 39, 0.18);
    padding: 1.2rem;
    display: flex;
    flex-direction: column;
    position: relative;
    color: #0b1727;
    transform: scale(0.95) translateY(10px);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal:not([hidden]) .modal-content {
    transform: scale(1) translateY(0);
}

.modal-content h3 {
    font-size: 1.02rem;
    font-weight: 700;
    margin: 0;
    color: #0b1727;
    margin-bottom: 1rem;
}

.modal-content p,
.modal-content label {
    color: #475569;
    font-size: 0.9375rem;
    
}
.modal-content p {
    font-size: 0.85rem;
    
}

.modal-content input[type="text"],
.modal-content input[type="number"],
.modal-content input[type="time"],
.modal-content input[type="email"],
.modal-content input[type="password"] {
    width: 100%;
    border-radius: 0.5rem;
    border: 1px solid rgba(148, 163, 184, 0.4);
    padding: 0.6rem 0.75rem;
    font-size: 0.9375rem;
    
    box-sizing: border-box;
}

.modal-content input:focus {
    outline: 2px solid rgba(13, 114, 78, 0.2);
    border-color: #0d724e;
}

.modal-content .btn-primary {
    background: #0d724e;
    color: #ffffff;
    border: 1px solid #0d724e;
    border-radius: 0.65rem;
    padding: 0rem 1.4rem;
    font-weight: 600;
    font-size: 0.9375rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    width: 100%;
    
}

.modal-content .btn-primary:hover,
.modal-content .btn-primary:active {
    background: #10825a;
}

.modal-content .btn-secondary,
.modal-content .ghost-btn {
    background: #f4f4f4;
    color: #111827;
    border: 1px solid #e5e7eb;
    border-radius: 0.65rem;
    padding: 0.6rem 1.4rem;
    font-weight: 600;
    font-size: 0.9375rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    
    
}

.modal-content .btn-secondary:hover,
.modal-content .btn-secondary:active {
    background: #e5e7eb;
}

.modal-close {
    position: absolute;
    top: 0.75rem;
    right: 0.85rem;
    background: transparent;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #94a3b8;
    padding: 0;
    width: auto;
    height: auto;
    display: block;
    margin-right: 4px;
}

.modal-close:hover {
    color: #0b1727;
    background: transparent;
    transform: none;
}

.modal-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

.edit-banner { background:#fef3c7; padding:8px; border-radius:6px; }

/* small toast */
.toast { position:fixed; right:16px; bottom:16px; background:#111; color:#fff; padding:10px 14px; border-radius:8px; opacity:0.95;
 z-index: 1000;
}

.card {
    background:#ffffff;
    border:1px solid rgba(18,22,42,0.06);
    border-radius:1.25rem;
    box-shadow:0 18px 42px rgba(11,23,39,0.08);
    padding:1.85rem 1.65rem;
    position:relative;
    overflow:hidden;
}
.card::after {
    content:"";
    position:absolute;
    inset:0;
    background:linear-gradient(135deg, rgba(240,249,245,0.22), rgba(255,255,255,0.05));
    pointer-events:none;
}
.card > * {
    position:relative;
    z-index:1;
}
.card-header {
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:1rem;
}


/* Ramadan subtle highlight for Suhoor & Iftar cards */
.prayer-card[data-prayer="suhoor"],
.prayer-card[data-prayer="iftar"] {
    border: 1px solid #c78700;
    background: linear-gradient(180deg, rgba(199,135,0,0.04), rgba(255,255,255,0.01));
    box-shadow: 0 6px 12px rgba(199,135,0,0.04);
    border-radius: 14px;
    position: relative;
}

.prayer-card[data-prayer="suhoor"] .label,
.prayer-card[data-prayer="iftar"] .label {
    color: #6b3f00;
    font-weight: 700;
    text-align: center;
}

.prayer-card[data-prayer="suhoor"] .time-display,
.prayer-card[data-prayer="iftar"] .time-display {
    color: #c78700;
    font-weight: 600;
}

.prayer-card[data-prayer="suhoor"]::after,
.prayer-card[data-prayer="iftar"]::after {
    
    top: 6px;
    right: 10px;
    font-size: 0.9rem;
    opacity: 0.95;
}

/* Label suffix styling: allow stacking on narrow screens */
.prayer-card .label .label-suffix { font-weight: 400; font-size: 0.85rem; margin-left: 6px; }
.prayer-card .label .hidden { display: none; }

@media (max-width: 520px) {
  .prayer-card .label { display:flex; flex-direction:column; gap:0; }
  .prayer-card .label .label-suffix { margin-left:0; }
}

/* Ramadan feature removed */
.card-header h2 {
    font-size:1.25rem;
    color:#0b1727;
    font-weight:700;
}
.card-subtitle {
    margin-bottom:1.25rem;
    color:#475569;
    font-size:0.9375rem;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:0.75rem;
    flex-wrap:wrap;
}

#calc-info-text {
    flex:1 1 auto;
    min-width:12rem;
}

/* Lines inside calc info: render each on its own row with a leading bullet */
#calc-info-text .calc-line {
    display: block;
    margin: 0;
    color: #475569;
    font-size: 0.9375rem;
}

.edit-inline-actions {
    display:inline-flex;
    align-items:center;
    gap:0.5rem;
    flex-wrap:wrap;
}

.edit-inline-actions[hidden] {
    display:none !important;
}
.btn-primary:link, .btn-primary:visited {
    background:#0d724e;
    color:#ffffff;
    border:1px solid #0d724e;
    border-radius:0.65rem;
    padding:0.6rem 1.4rem;
    font-weight:600;
    font-size:0.9375rem;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:0.4rem;
    transition:background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.btn-primary:hover, .btn-primary:active {
    background:#10825a;
}

.btn-secondary:link, .btn-secondary:visited {
    background:#f3f4f6;
    color:#111827;
    border:1px solid #e5e7eb;
    border-radius:0.65rem;
    padding:0.6rem 1.4rem;
    font-weight:600;
    font-size:0.9375rem;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:0.4rem;
    transition:background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    background:#10825a;
}
.ghost-btn {
    background:#f4f4f4;
    color:#0b1727;
    border:1px solid #e6e9ee;
    border-radius:0.65rem;
    padding:0.6rem 1.4rem;
    font-weight:600;
    font-size:0.9375rem;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:0.4rem;
    transition:background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.ghost-btn:active{
    transform:scale(98%);
}

.ghost-btn:disabled,
.btn-secondary:disabled {
    background:rgba(148,163,184,0.12);
    color:#94a3b8;
    border-color:rgba(148,163,184,0.35);
    cursor:not-allowed;
    box-shadow:none;
    transform:none;
}
.schedule-toolbar {
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:1rem;
    padding:0.75rem 1rem;
    margin-bottom:1rem;
    border:1px dashed rgba(13,114,78,0.18);
    border-radius:0.75rem;
    background:rgba(240,249,245,0.6);
}
.schedule-toolbar[hidden] {
    display:none !important;
}
.toolbar-status {
    color:#0d724e;
    font-weight:600;
    font-size:0.9375rem;
    margin-top: 0;
}
.toolbar-actions {
    display:flex;
    gap:0.6rem;
}

/* Color overrides to match support-actions buttons */
.toolbar-actions .btn-primary {
    background: #0d724e;
    color: #ffffff;
    border-color: #0d724e;
}
.toolbar-actions .btn-primary:hover,
.toolbar-actions .btn-primary:active {
    background: #10825a;
}

.toolbar-actions .btn-secondary {
    background: #f3f4f6;
    color: #111827;
    border-color: #e5e7eb;
}
.toolbar-actions .btn-secondary:hover,
.toolbar-actions .btn-secondary:active {
    background: #e5e7eb;
}

#update-board {
    list-style:none;
    padding:0;
    margin:0;
    display:flex;
    flex-direction:column;
    gap:0.75rem;
}
#update-board li {
    padding:0.75rem 0.85rem;
    border-radius:0.75rem;
    background:linear-gradient(135deg, rgba(244,246,250,0.8), rgba(255,255,255,0.85));
    border:1px solid rgba(18,22,42,0.04);
    color:#475569;
    font-size:0.9375rem;
}
/* Ramadan feature removed - .mosque-ramadan styles deleted */
/* Ramadan feature removed - styles deleted */
.status-pill {
    display:inline-flex;
    align-items:center;
    padding:0.35rem 0.8rem;
    border-radius:999px;
    background:rgba(13,114,78,0.12);
    color:#0d724e;
    font-weight:600;
    font-size:0.833rem;
}
/* Ramadan feature removed - grid styles deleted */
.support-card {
    display:flex;
    flex-direction:column;
    gap:0.85rem;
}
.support-card h2 {
    font-size:1.25rem;
    font-weight:700;
    color:#0b1727;
}
.support-card p {
    color:#475569;
    font-size:0.9375rem;
}
.support-actions {
    display:flex;
    flex-wrap:wrap;
    gap:0.75rem;
}

/* Updated styles for support-actions buttons */
.support-actions .btn-primary {
    background: #0d724e;
    color: #ffffff;
    border: 1px solid #0d724e;
    border-radius: 0.65rem;
    padding: 0.6rem 1.4rem;
    font-weight: 600;
    font-size: 0.9375rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.support-actions .btn-primary:hover, .support-actions .btn-primary:active {
    background: #10825a;
}

.support-actions .btn-secondary {
    background: #f3f4f6;
    color: #111827;
    border: 1px solid #e5e7eb;
    border-radius: 0.65rem;
    padding: 0.6rem 1.4rem;
    font-weight: 600;
    font-size: 0.9375rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.support-actions .btn-secondary:hover, .support-actions .btn-secondary:active {
    background: #e5e7eb;
}

.support-notes {
    display:flex;
    flex-direction:column;
    gap:0.65rem;
}

.support-card .support-note {
    padding:0.75rem 1rem;
    border-radius:0.75rem;
    background:rgba(13,114,78,0.12);
    color:#0d724e;
    font-size:0.833rem;
    font-weight:500;
    line-height:1.5;
}

.support-card .support-note.info {
    background:rgba(148,163,184,0.15);
    color:#334155;
    margin-top: 0;
}

.support-card .support-note.warning {
    background:#fef3c7;
    border-left:3px solid #f59e0b;
    color:#92400e;
}

.support-card .support-note[hidden] {
    display:none;
}

.support-card .support-footnote {
    font-size:0.833rem;
    color:#64748b;
    margin-top:0.35rem;
}

/* Full-viewport landing layout */
.mosque-page {
    flex: 1 0 auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.hero-overview-container {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 0rem;
    max-height: fit-content;
}

.mosque-hero {
    
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    


}

.hero-details {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    text-align: center;
}

.hero-clock {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    justify-content: space-between;

}

.date-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 0.85rem;
    background: rgba(255,255,255,0.75);
    border-radius: 999px;
    font-size: 0.833rem;
    color: #27403a;
    border: 1px solid rgba(13,114,78,0.15);
    height: fit-content;
}


.hero-title {
    font-size: 1.5rem;
    margin: 0;
    color: #0b3b2f;
    font-weight: 700;
    margin-bottom: 0.25rem;
    margin-top: 0.25rem;
    padding: 0 1rem;
}

.hero-location {
    margin: 0;
    color: #3e6055;
    font-size: 0.9375rem;
}

.mosque-overview {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    
}

.schedule-card {
    display: block;
}

.card-header {
    flex-wrap: nowrap;
    gap: 0.85rem;
}

.card-header h2 {
    flex: 1 1 auto;
    min-width: 0;
}

.card-header .ghost-btn {
    flex-shrink: 0;
}

.next-prayer {
    text-align: center;
    font-size: 0.875rem;
    color: #475569;
    margin: 0rem 0;
    font-weight: 500;
}

.next-prayer strong {
    color: #0d724e;
}
/* Mobile-first mosque public page styles */
.mobile-view{ padding:18px; background: linear-gradient(180deg,#dfeee7 0%, #f0f2f1 100%); min-height:100vh; box-sizing:border-box }
.top-meta{ display:flex; justify-content:space-between; font-size:0.833rem; color:#27403a; margin-bottom:8px }
.bismillah{ text-align:center; font-size:1.25rem; margin:6px 0; color:#344b44; font-family:'Noto Nastaliq Urdu', serif; line-height:2; margin-top:10px}
.now-clock{ text-align:center; font-size:1rem; font-weight:700; margin:5px 0 0 }
.mosque-name{ text-align:center; font-size:1.5rem; margin:6px 0; color:#0b3b2f }
.subtle{ text-align:center; color:#3e6055; margin-bottom:8px }
.countdown{ display:flex; gap:12px; justify-content:center; margin:0.55rem 0 0; }
.count-card{ 
    background:#fff; border-radius:12px; padding:1rem 0.8rem; font-size:1.7rem; font-weight:800; box-shadow:0 8px 20px rgba(0,0,0,0.15); text-align:center; 

}
.count-label{ text-align:center; font-size:0.833rem; color:#566b64; margin-top:6px }
.prayer-grid{ display:flex; flex-wrap:wrap; gap:12px; margin-top:1rem; padding: 0.5rem; margin-bottom: 1rem;}
.prayer-card,
.ramadan-item { 
    background:#fff; 
    border-radius:12px; 
    padding:14px; 
    text-align:center; 
    box-shadow:0 6px 14px rgba(0,0,0,0.06);
    display: block;
    flex: 1 1 0;
    min-width: 30%;
}

.prayer-card .label { 
    font-size:0.694rem; 
    letter-spacing:1px; 
    color:#5b6b65; 
    text-transform: none;
    margin: 0;
    font-weight: 400;
    text-align: center;
}

.prayer-card .time { 
    font-size:1.25rem; 
    font-weight:800; 
    margin-top:6px;
    color: inherit;
}

.prayer-card.editing .time-display{ display:none; }
.prayer-card .time-input{ display:none; margin-top:0px; margin-bottom:0px; }
.prayer-card.editing .time-input{ display:inline-block; }

.prayer-card .sub { 
    font-size:0.694rem; 
    color:#7a8b84; 
    margin-top:4px;
    display: block;
}

.prayer-card.manual-override{ box-shadow:0 8px 18px rgba(13,114,78,0.18); }
.prayer-card.active{ background:#0d724e; color:#fff; }
.prayer-card.active .sub{ color:rgba(255,255,255,0.9) }
.prayer-card.active .label{ color:rgba(255,255,255,0.95) }
.time-input.is-auto-disabled {
    opacity:0.65;
}
.jumua{ margin-top:12px }
.jumua .jumua-card{ background:#fff; padding:12px; border-radius:12px; text-align:center; box-shadow:0 6px 14px rgba(0,0,0,0.06) }
.meta-bottom{ margin-top:18px; text-align:center; color:#476055 }
.edit-btn{ background:#0d724e; color:#fff; border:none; padding:10px 18px; border-radius:12px; font-weight:700 }

.manual-info {
    font-weight: 600;
    letter-spacing: 0.01em;
    margin: 0;
}
.manual-info[hidden] {
    display: none;
}

.hero-location {
    margin: 0;
}




#navigation {
    list-style: none;
    display: flex;
    gap: 16px;
    justify-content: center;

}
body {
    max-width: 1440px;
    margin: 0 auto;
    min-height: 100%;
    display: flex;
    flex-direction: column;
}
.dots {
    list-style: circle;
    display: flex;
    gap: 16px;
    justify-content: center;
    gap: 60px;
    margin-top: 60px;
}
.hero-dates {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 0.5rem;
    gap: 1rem;
    
}


.hero-updated {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 0;
}

#mosque-location {
    max-width: 439px;
    margin-right: auto;
    margin-left: auto;
}

@media(min-width:900px){
    .mobile-view{ 
        max-width:980px; 
        margin:0 auto 
    }
    .prayer-card, .ramadan-item { 
        min-width: 14%;
    }

}
@media (min-width:720px){
    .two-col{ display:flex; gap:16px; }
    .two-col > *{ flex:1 }
}
@media(max-width:640px){
    .hero-title { 
        font-size:1.1rem;

    }
    .card-header h2 {
    font-size:1rem;
    }
    .support-actions {
        flex-direction:column;
        align-items:stretch;
    }

    .hero-location {
        font-size: 0.8rem;
        padding:0 2rem ;
    }
    .card {
        border-radius: 0;
    }

    .bismillah{
        font-size:0.9375rem;

    }
    .date-pill{
        font-size:0.75rem;
    }
    p {
        font-size: 0.75rem;
    }
    .count-label{
        font-size:0.75rem;
    }
    .support-card p {
        font-size: 0.85rem;
    }
    .support-card h2 {
    font-size:1rem;
    }
    .status-pill { 
        font-size:0.75rem;
    }
    
    /* Mobile tweaks for edit toolbar */
    .schedule-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }
    
    .toolbar-status {
        text-align: center;
        margin-bottom: 0.25rem;
    }
    
    .toolbar-actions {
        display: flex;
        gap: 0.5rem;
    }
    
    .toolbar-actions button {
        flex: 1;
        justify-content: center;
    }
    /* Lines inside calc info: render each on its own row with a leading bullet */
#calc-info-text .calc-line {
    font-size: 0.85rem;
}
p {
    margin-top: 0rem;
}
}
@media(max-width:491px){
    .hero-title { 
        padding: 0 2rem;

    }
}
@media(max-width: 453px){
    .date-pill {
        font-size: clamp(0.5rem, 3vw, 0.75rem);
        padding: 0.3rem 0.4rem;
        white-space: nowrap;
    }
    .hero-dates {
        gap: 0.5rem;
        flex-wrap: nowrap;

    }
}

@media(max-width:372px){
    .hero-dates { 
        gap: 0.3rem;
        
    }
}
.material-symbols-rounded {
  font-variation-settings:
  'FILL' 0,
  'wght' 700,
  'GRAD' 0,
  'opsz' 20;
}

/* Theme Selector Styling (matching other select inputs) */
#theme-selector {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-color: #ffffff;
    border: 1px solid #e6e9ee;
    border-radius: 0.375rem;
    padding: 0.5625rem 2.5rem 0.5625rem 0.625rem;
    font-size: 0.9375rem;
    color: #0f172a;
    cursor: pointer;
    
    /* Custom Arrow */
    background-image:
        linear-gradient(45deg, transparent 50%, gray 50%),
        linear-gradient(135deg, gray 50%, transparent 50%),
        linear-gradient(to right, #ccc, #ccc);
    background-position:
        calc(100% - 20px) calc(50%),
        calc(100% - 15px) calc(50%),
        calc(100% - 2.5em) 0.5em;
    background-size:
        5px 5px,
        5px 5px,
        1px 1.5em;
    background-repeat: no-repeat;
}

#theme-selector:focus {
    outline: 2px solid rgba(13,114,78,0.12);
    border-color: #0d724e;
}
/* Loading Overlay */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: #fcfcfc;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.loading-content {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(13, 114, 78, 0.15);
  border-top-color: #0d724e;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.loading-text {
  font-family: Inter, sans-serif;
  color: #666;
  font-size: 0.95rem;
  font-weight: 500;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Adjust layout for screens wider than 830px */
@media (min-width: 960px) {
    .mosque-page {
        flex-direction: row;
        justify-content: center;
        align-items: flex-start;
        padding: 2rem;
        gap: 2rem;
    }

    .hero-overview-container,
    .mosque-support {
        width: 100%;
        max-width: 720px;
        flex: 1;
    }
}
