/* ============================================
   Double Taph Jewish Calendar — Frontend CSS
   Brand: Navy Blue #1a3a8f  |  Gold #c9a84c
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600;700&family=Lato:wght@400;600&display=swap');

.dt-cal-wrap {
    --dt-blue:   #1a3a8f;
    --dt-gold:   #c9a84c;
    --dt-dark:   #0d1f4e;
    --dt-light:  #f4f1ea;
    --dt-border: #ddd6c1;
    --dt-radius: 12px;
    font-family: 'Lato', sans-serif;
    max-width: 900px;
    margin: 0 auto;
    background: var(--dt-light);
    border-radius: var(--dt-radius);
    box-shadow: 0 8px 40px rgba(26,58,143,.18);
    overflow: hidden;
    border: 2px solid var(--dt-gold);
    position: relative;
}

/* HEADER */
.dt-cal-header {
    background: linear-gradient(135deg, var(--dt-dark) 0%, var(--dt-blue) 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 28px;
}
.dt-cal-title {
    text-align: center;
    flex: 1;
}
.dt-cal-title #dt-month-label {
    font-family: 'Playfair Display', serif;
    font-size: 1.7rem;
    font-weight: 700;
    display: block;
    letter-spacing: .04em;
    color: var(--dt-gold);
}
.dt-heb-label {
    font-size: .9rem;
    color: #b0c4f8;
    letter-spacing: .06em;
    display: block;
    margin-top: 2px;
}
.dt-nav {
    background: transparent;
    border: 2px solid var(--dt-gold);
    color: var(--dt-gold);
    font-size: 2rem;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    cursor: pointer;
    line-height: 1;
    transition: background .2s, color .2s;
}
.dt-nav:hover {
    background: var(--dt-gold);
    color: var(--dt-dark);
}

/* LEGEND */
.dt-cal-legend {
    background: var(--dt-blue);
    color: #fff;
    padding: 6px 20px;
    font-size: .82rem;
    display: flex;
    gap: 18px;
    align-items: center;
}
.dt-legend-dot {
    display: inline-block;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    margin-right: 5px;
}

/* DAY-OF-WEEK HEADER */
.dt-cal-grid-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: var(--dt-gold);
}
.dt-cal-grid-header span {
    text-align: center;
    padding: 8px 0;
    font-weight: 700;
    font-size: .82rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--dt-dark);
}
.dt-cal-grid-header .shabbat {
    color: var(--dt-dark);
    background: rgba(0,0,0,.12);
}

/* GRID */
.dt-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: var(--dt-border);
    padding: 1px;
}
.dt-loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: 48px;
    color: var(--dt-blue);
    font-size: 1rem;
    animation: dt-pulse 1.2s ease-in-out infinite;
}
@keyframes dt-pulse {
    0%,100% { opacity: .5; }
    50%      { opacity: 1; }
}

/* DAY CELL */
.dt-day {
    background: #fff;
    min-height: 90px;
    padding: 6px 8px;
    cursor: default;
    transition: background .15s;
    position: relative;
    overflow: hidden;
}
.dt-day:hover {
    background: #f0ecff;
    z-index: 1;
}
.dt-day.dt-empty {
    background: #f8f6f0;
    cursor: default;
}
.dt-day.dt-today .dt-day-num {
    background: var(--dt-blue);
    color: #fff;
    border-radius: 50%;
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.dt-day.dt-shabbat {
    background: #fffbf0;
    border-left: 3px solid var(--dt-gold);
}
.dt-day-num {
    font-weight: 700;
    font-size: .9rem;
    color: var(--dt-dark);
    margin-bottom: 2px;
    display: inline-block;
}
.dt-day-heb {
    display: block;
    font-size: .68rem;
    color: #8892b0;
    margin-bottom: 4px;
    direction: rtl;
}

/* EVENT DOTS + CHIPS */
.dt-events {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-top: 2px;
}
.dt-event-chip {
    font-size: .7rem;
    padding: 2px 5px;
    border-radius: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #fff;
    cursor: pointer;
    font-weight: 600;
    transition: opacity .15s;
}
.dt-event-chip:hover { opacity: .82; }
.dt-more {
    font-size: .68rem;
    color: var(--dt-blue);
    font-weight: 600;
    cursor: pointer;
    padding: 1px 4px;
}
.dt-more:hover { text-decoration: underline; }

/* has-events cursor */
.dt-day.dt-has-events { cursor: pointer; }

/* POPUP */
.dt-popup {
    position: fixed;
    inset: 0;
    background: rgba(10,18,50,.55);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: dt-fade-in .2s ease;
}
@keyframes dt-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}
.dt-popup-inner {
    background: #fff;
    border-radius: 14px;
    padding: 30px 32px 24px;
    min-width: 300px;
    max-width: 480px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0,0,0,.35);
    position: relative;
    border-top: 5px solid var(--dt-gold);
    animation: dt-slide-up .25s ease;
}
@keyframes dt-slide-up {
    from { transform: translateY(30px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}
.dt-popup-inner h3 {
    font-family: 'Playfair Display', serif;
    color: var(--dt-blue);
    font-size: 1.3rem;
    margin: 0 0 14px;
}
.dt-popup-inner ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.dt-popup-inner ul li {
    border-left: 4px solid var(--dt-gold);
    padding: 8px 12px;
    margin-bottom: 10px;
    background: var(--dt-light);
    border-radius: 0 8px 8px 0;
}
.dt-popup-inner ul li .ev-title {
    font-weight: 700;
    color: var(--dt-dark);
    font-size: .95rem;
}
.dt-popup-inner ul li .ev-desc {
    color: #666;
    font-size: .83rem;
    margin-top: 3px;
}
.dt-popup-inner ul li.ev-holiday {
    border-left-color: var(--dt-blue);
}
.dt-popup-close {
    position: absolute;
    top: 12px;
    right: 14px;
    background: transparent;
    border: none;
    font-size: 1.3rem;
    color: #999;
    cursor: pointer;
    line-height: 1;
}
.dt-popup-close:hover { color: var(--dt-blue); }

/* RESPONSIVE */
@media (max-width: 600px) {
    .dt-day { min-height: 60px; padding: 4px 4px; }
    .dt-day-num { font-size: .8rem; }
    .dt-event-chip { font-size: .62rem; padding: 1px 3px; }
    .dt-cal-title #dt-month-label { font-size: 1.2rem; }
}
