/*
 * Exeter Events Calendar - calendar.css
 * Location: /home/public_html/website/assets/css/calendar.css
 * Requires: Bootstrap 5, Font Awesome 6
 */

:root {
    --pr:   #1a5276;
    --pr-l: #d6eaf8;
    --ac:   #e67e22;
    --ac-l: #fdebd0;
    --tx:   #212529;
    --mu:   #6c757d;
    --bd:   #dee2e6;
    --bg:   #f8f9fa;
    --wh:   #ffffff;
    --rd:   10px;
    --mw:   200px;
}

/* EDITORIAL INTRO */
.ev-editorial {
    background: var(--wh); border: 1px solid var(--bd);
    border-radius: var(--rd); padding: 1.25rem 1.5rem;
    border-left: 4px solid var(--ac);
}
.ev-editorial-title {
    font-size: 1.1rem; font-weight: 700; color: var(--pr);
    margin-bottom: 0.75rem;
}
.ev-editorial-body p {
    font-size: 0.9rem; color: var(--mu);
    margin-bottom: 0.75rem; line-height: 1.65;
}
.ev-editorial-body a { color: var(--pr); }
.ev-editorial-body a:hover { color: var(--ac); }
.ev-editorial-body p:last-of-type { margin-bottom: 0.85rem; }

/* Hidden content - in DOM for SEO, toggled for users */
.ev-editorial-more {
    max-height: 0; overflow: hidden;
    transition: max-height 0.35s ease;
}
.ev-editorial-more.open {
    max-height: 600px;
}

.ev-editorial-links {
    display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.75rem;
    align-items: center;
}
.ev-editorial-toggle {
    display: inline-flex; align-items: center; gap: 0.4rem;
    font-size: 0.82rem; font-weight: 600; padding: 5px 14px;
    border-radius: 999px; cursor: pointer; transition: all 0.15s;
    border: 1.5px solid var(--pr); background: var(--wh); color: var(--pr);
}
.ev-editorial-toggle:hover { background: var(--pr-l); }
.ev-toggle-icon { font-size: 0.65rem; transition: transform 0.3s ease; }
.ev-editorial-toggle.open .ev-toggle-icon { transform: rotate(180deg); }
.ev-editorial-link {
    display: inline-flex; align-items: center; gap: 0.4rem;
    font-size: 0.82rem; font-weight: 600; padding: 5px 14px;
    border-radius: 999px; text-decoration: none; transition: all 0.15s;
    border: 1.5px solid var(--bd); background: var(--bg); color: var(--pr);
}
.ev-editorial-link:hover { border-color: var(--pr); background: var(--pr-l); color: var(--pr); }
.ev-editorial-link--accent {
    background: var(--ac); border-color: var(--ac); color: #fff !important;
}
.ev-editorial-link--accent:hover { background: #ca6f1e; border-color: #ca6f1e; color: #fff !important; }

@media (max-width: 767px) {
    .ev-editorial { padding: 1rem 1rem; }
    .ev-editorial-more.open { max-height: 900px; }
}

/* FEATURED STRIP */
.ev-feat { margin-bottom: 1.5rem; }
.ev-sect-title {
    font-size: 0.78rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.08em; color: var(--mu); margin-bottom: 0.85rem;
    padding-bottom: 0.5rem; border-bottom: 2px solid var(--ac); display: inline-block;
}
.ev-feat-scroll {
    display: flex; gap: 1rem; overflow-x: auto; padding-bottom: 0.75rem;
    scrollbar-width: thin; scrollbar-color: var(--bd) transparent;
    -webkit-overflow-scrolling: touch;
}
.ev-feat-scroll::-webkit-scrollbar { height: 4px; }
.ev-feat-scroll::-webkit-scrollbar-thumb { background: var(--bd); border-radius: 2px; }
.ev-feat-card {
    min-width: 240px; max-width: 260px; background: var(--wh);
    border: 1px solid var(--bd); border-radius: var(--rd);
    overflow: hidden; flex-shrink: 0; border-top: 3px solid var(--ac);
    transition: box-shadow 0.15s;
}
.ev-feat-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.09); }
.ev-feat-card a { text-decoration: none; color: inherit; }
.ev-feat-img { width: 100%; height: 130px; overflow: hidden; background: var(--bg); }
.ev-feat-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.ev-feat-card:hover .ev-feat-img img { transform: scale(1.04); }
.ev-feat-body { padding: 0.9rem 1.1rem; }
.ev-feat-date { font-size: 0.75rem; color: var(--ac); font-weight: 600; margin-bottom: 0.35rem; text-transform: uppercase; letter-spacing: 0.04em; }
.ev-feat-title { font-size: 0.9rem; font-weight: 600; color: var(--tx); margin-bottom: 0.25rem; line-height: 1.35; }
.ev-feat-venue { font-size: 0.78rem; color: var(--mu); }

/* TIME FILTER BAR */
.ev-timebar {
    display: flex; align-items: center; gap: 0.5rem;
    margin-bottom: 1.25rem; padding: 0.65rem 1rem;
    background: var(--wh); border: 1px solid var(--bd); border-radius: var(--rd);
    overflow-x: auto; flex-wrap: nowrap;
    scrollbar-width: thin; scrollbar-color: var(--bd) transparent;
    -webkit-overflow-scrolling: touch;
}
.ev-timebar::-webkit-scrollbar { height: 4px; }
.ev-timebar::-webkit-scrollbar-thumb { background: var(--bd); border-radius: 2px; }
@media (hover: none) {
    .ev-timebar, .ev-feat-scroll { scrollbar-width: none; }
    .ev-timebar::-webkit-scrollbar,
    .ev-feat-scroll::-webkit-scrollbar { display: none; }
}
.ev-flabel { font-size: 0.75rem; font-weight: 600; color: var(--mu); text-transform: uppercase; letter-spacing: 0.06em; white-space: nowrap; flex-shrink: 0; }
.ev-tchip {
    padding: 5px 15px; border-radius: 999px; font-size: 0.83rem; font-weight: 500;
    cursor: pointer; border: 1.5px solid var(--bd); background: var(--wh);
    color: var(--tx); transition: all 0.15s; white-space: nowrap; flex-shrink: 0;
}
.ev-tchip:hover { border-color: var(--pr); color: var(--pr); }
.ev-tchip.active { background: #c8f04a !important; border-color: #a0c030 !important; color: #1a2f00 !important; font-weight: 600; }
.ev-resetbtn {
    font-size: 0.8rem; font-weight: 700; color: var(--mu); cursor: pointer;
    text-decoration: underline; background: none; border: none;
    padding: 5px 6px; text-transform: uppercase; white-space: nowrap; flex-shrink: 0;
}
.ev-resetbtn:hover { color: var(--tx); }

/* FILTER STATUS BAR */
.ev-status {
    display: none; align-items: center; justify-content: space-between;
    gap: 0.75rem; padding: 0.6rem 1rem; margin-bottom: 0.85rem;
    background: #fff8e6; border: 1px solid #f0c040; border-radius: var(--rd); flex-wrap: wrap;
}
.ev-status.on { display: flex; }
.ev-status-text { font-size: 0.82rem; color: #7a5200; display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; }
.ev-status-text i { color: #e6a817; }
.ev-stag { display: inline-block; background: #f0c040; color: #5a3c00; font-weight: 600; font-size: 0.78rem; padding: 2px 10px; border-radius: 999px; }
.ev-clearbtn {
    font-size: 0.8rem; font-weight: 700; color: #7a5200; background: none;
    border: 1.5px solid #f0c040; border-radius: 999px; padding: 4px 14px;
    cursor: pointer; white-space: nowrap; transition: all 0.15s;
}
.ev-clearbtn:hover { background: #f0c040; color: #3a2000; }

/* SPLIT PANEL */
.ev-split { display: flex; border: 1px solid var(--bd); border-radius: var(--rd); overflow: hidden; background: var(--wh); }

/* Month sidebar */
.ev-months { width: var(--mw); flex-shrink: 0; background: var(--bg); border-right: 1px solid var(--bd); align-self: stretch; }
button.ev-mbtn {
    display: flex !important; align-items: center; justify-content: space-between;
    width: 100%; padding: 0.8rem 1rem; border: none;
    border-bottom: 1px solid var(--bd); background: transparent !important;
    text-align: left; font-size: 0.88rem; color: var(--tx) !important;
    cursor: pointer; transition: background 0.12s; border-radius: 0;
}
button.ev-mbtn:last-child { border-bottom: none; }
button.ev-mbtn:hover { background: #e9ecef !important; }
button.ev-mbtn.active { background: var(--pr) !important; color: #fff !important; font-weight: 600; }
.ev-mbadge { font-size: 0.7rem; background: rgba(0,0,0,0.08); border-radius: 999px; padding: 1px 7px; color: var(--mu); flex-shrink: 0; }
button.ev-mbtn.active .ev-mbadge { background: rgba(255,255,255,0.25) !important; color: #fff !important; }
.ev-marrow { font-size: 0.7rem; color: var(--mu); margin-left: 4px; }
button.ev-mbtn.active .ev-marrow { color: rgba(255,255,255,0.7) !important; }

/* Events panel */
.ev-panel { flex: 1; min-width: 0; padding: 1.1rem 1.35rem; min-height: 520px; }
.ev-pmonth { display: none; }
.ev-pmonth.active { display: block; }

/* Panel header */
.ev-phead {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 0.75rem; padding-bottom: 0.65rem;
    border-bottom: 1px solid var(--bd); gap: 0.5rem;
}
.ev-ptitle-wrap { min-width: 0; flex-shrink: 1; }
.ev-ptitle { font-size: 1.05rem; font-weight: 600; color: var(--pr); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev-psub { display: none; font-size: 0.72rem; color: var(--mu); white-space: nowrap; }
.ev-ppills { display: flex; align-items: center; gap: 0.5rem; flex-shrink: 0; }

/* Pills */
.ev-pill {
    font-size: 0.78rem; font-weight: 600; color: var(--pr);
    background: var(--pr-l); border: 1px solid #a9cce3; border-radius: 999px;
    padding: 4px 12px; cursor: pointer; display: flex; align-items: center;
    gap: 5px; transition: all 0.15s; white-space: nowrap;
}
.ev-pill:hover { background: #c2daf0; }
.ev-pill.filtered { background: var(--pr); color: #fff; border-color: var(--pr); }
.ev-pill .chev { font-size: 0.65rem; transition: transform 0.2s; }
.ev-pill.open .chev { transform: rotate(180deg); }
.ev-mpill { display: none; }

/* Drawers */
.ev-drawer {
    display: none; flex-wrap: wrap; gap: 6px;
    padding: 0.65rem 0.75rem; background: var(--bg);
    border: 1px solid var(--bd); border-radius: 8px; margin-bottom: 0.85rem;
}
.ev-drawer.open { display: flex; }
.ev-chip {
    padding: 4px 13px; border-radius: 999px; font-size: 0.8rem; cursor: pointer;
    border: 1px solid var(--bd); background: var(--wh); color: var(--mu);
    transition: all 0.15s; user-select: none;
}
.ev-chip:hover { border-color: var(--pr); color: var(--pr); }
.ev-chip.active { background: var(--pr); border-color: var(--pr); color: #fff; }

/* Event card */
.ev-card {
    display: flex; gap: 0.85rem; background: var(--wh);
    border: 1px solid var(--bd); border-radius: 8px;
    padding: 0.8rem 0.95rem; margin-bottom: 0.55rem; align-items: flex-start;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.ev-card:hover { border-color: #adb5bd; box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.ev-card.ev-p5 { border-left: 3px solid var(--ac); background: #fffdf7; }
.ev-card.ev-p4 { border-left: 3px solid #f5d76e; background: #fffefc; }
.ev-card a.ev-clink { text-decoration: none; color: inherit; display: flex; gap: 0.85rem; width: 100%; align-items: flex-start; }
.ev-card-img { width: 70px; height: 70px; border-radius: 6px; overflow: hidden; flex-shrink: 0; background: var(--bg); }
.ev-card-img img { width: 100%; height: 100%; object-fit: cover; }
.ev-dchip { min-width: 44px; max-width: 44px; text-align: center; background: var(--pr-l); border-radius: 7px; padding: 6px 4px; flex-shrink: 0; }
.ev-dchip .d { font-size: 1.15rem; font-weight: 700; color: var(--pr); line-height: 1; }
.ev-dchip .m { font-size: 0.6rem; color: var(--pr); text-transform: uppercase; letter-spacing: 0.04em; margin-top: 2px; }
.ev-dchip.rec { background: var(--ac-l); }
.ev-dchip.rec .d { font-size: 0.75rem; color: var(--ac); font-weight: 800; text-transform: uppercase; letter-spacing: 0.03em; }
.ev-dchip.rec .m { display: none; }
.ev-cbody { flex: 1; min-width: 0; }
.ev-ctitle { font-size: 0.9rem; font-weight: 600; color: var(--tx); margin-bottom: 0.15rem; line-height: 1.35; }
.ev-cmeta { font-size: 0.78rem; color: var(--mu); margin-bottom: 0.25rem; }
.ev-cmeta i { width: 13px; margin-right: 3px; }
.ev-cfoot { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.3rem; }
.ev-badge { font-size: 0.68rem; padding: 2px 9px; border-radius: 999px; font-weight: 500; background: var(--pr-l); color: var(--pr); }
.ev-cost { font-size: 0.74rem; color: var(--mu); }
.ev-cost.free { color: #1a7a4a; font-weight: 600; }
.ev-more { font-size: 0.74rem; color: var(--pr); margin-left: auto; }
.ev-empty { text-align: center; padding: 2.5rem 1rem; color: var(--mu); font-size: 0.9rem; }
.ev-empty i { display: block; margin-bottom: 0.75rem; }
.ev-nomatch { text-align: center; padding: 1.5rem 1rem; color: var(--mu); font-size: 0.85rem; display: none; }
.ev-range-divider {
    font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.08em; color: var(--mu);
    padding: 0.75rem 0 0.4rem; margin-top: 0.5rem;
    border-top: 1px solid var(--bd);
}
.ev-range-divider:first-child { border-top: none; margin-top: 0; padding-top: 0; }

/* DISCLAIMER */
.ev-disclaimer {
    font-size: 0.78rem; color: var(--mu); margin-top: 0.85rem;
    padding-top: 0.75rem; border-top: 1px solid var(--bd);
    font-style: italic;
}
.ev-disclaimer i { font-size: 0.72rem; }
@media (max-width: 767px) {
    .ev-header { padding: 1.5rem 0 1.25rem; }
    .ev-header h1 { font-size: 1.4rem; }
    .ev-months { display: none; }
    .ev-mpill { display: flex; }
    .ev-phead { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
    .ev-ptitle-wrap { width: 100%; }
    .ev-ptitle-row { display: flex; align-items: baseline; gap: 6px; }
    .ev-ptitle { font-size: 1rem; flex-shrink: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .ev-psub { display: block; flex-shrink: 0; }
    .ev-ppills { width: 100%; justify-content: flex-start; }
    .ev-panel { padding: 0.85rem 0.9rem; min-height: 400px; }
    .ev-card { padding: 0.7rem 0.8rem; gap: 0.65rem; }
    .ev-card-img { width: 55px; height: 55px; }
    .ev-dchip { min-width: 40px; max-width: 40px; }
    .ev-feat-card { min-width: 200px; max-width: 220px; }
    .ev-feat-img { height: 110px; }
}
@media (min-width: 768px) {
    .ev-ptitle-row { display: block; }
    .ev-psub { display: none; }
}
