/* ===========================================================================
   Datebook — navbar date trigger + right-hand slide-in panel.
   =========================================================================== */

/* ------------------------------ navbar trigger ---------------------------- */
.db-trigger {
    display: inline-flex; align-items: center; gap: 12px;
    border: 0; background: none; cursor: pointer; padding: 4px 8px; border-radius: 10px;
    color: #5b6270; font-family: inherit;
}
.db-trigger:hover { background: #f5f6f8; }
.db-trigger__text { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.2; }
.db-trigger__day  { font-size: .8rem; color: #8a8f99; }
.db-trigger__date { font-size: 1rem; color: #5b6270; font-weight: 500; }
.db-trigger .material-symbols-rounded { font-size: 30px; color: #6b7280; }
@media (max-width: 820px) { .db-trigger__text { display: none; } }

/* The navbar is its own (sticky, z-index:10) stacking layer; lift it above the page while open. */
.app-navbar:has(.db-panel) { z-index: 3000; }

/* --------------------------------- overlay -------------------------------- */
.db-overlay {
    position: fixed; inset: 0; z-index: 3000;
    background: rgba(35, 38, 50, .42);
    animation: db-fade .18s ease-out;
}
@keyframes db-fade { from { opacity: 0; } to { opacity: 1; } }

/* ---------------------------------- panel --------------------------------- */
.db-panel {
    position: fixed; top: 0; right: 0; bottom: 0; z-index: 3001;
    width: min(480px, 100vw);
    background: #f5f5f6;
    box-shadow: -12px 0 40px rgba(20, 20, 40, .22);
    border-radius: 18px 0 0 18px;
    display: flex; flex-direction: column; overflow-y: auto;
    animation: db-slide .22s ease-out;
}
@keyframes db-slide { from { transform: translateX(100%); } to { transform: translateX(0); } }

.db-head { position: relative; display: flex; align-items: center; justify-content: center; padding: 18px 20px 10px; }
.db-head h2 { margin: 0; font-size: 1.35rem; font-weight: 400; color: #4b4f58; }
.db-close {
    position: absolute; right: 16px; top: 14px;
    width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center;
    border: 0; background: none; border-radius: 8px; cursor: pointer; color: #4b4f58;
}
.db-close:hover { background: rgba(0, 0, 0, .06); }

/* week strip */
.db-week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; padding: 6px 20px 16px; }
.db-day {
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    border: 0; background: none; cursor: pointer; padding: 10px 0; border-radius: 10px;
    font-family: inherit; color: #5b6270;
}
.db-day__name { font-size: .9rem; color: #7a808c; }
.db-day__num  { font-size: 1.08rem; font-weight: 500; color: #4b4f58; }
.db-day:hover { background: rgba(255, 255, 255, .6); }
.db-day.is-selected { background: #fff; box-shadow: 0 1px 4px rgba(20, 20, 40, .12); }
.db-day.is-weekend .db-day__name, .db-day.is-weekend .db-day__num { color: #d29aa3; }

/* sections */
.db-section { padding: 16px 20px 18px; border-top: 1px solid #e4e4e8; }
.db-section--holidays { background: #eef0f6; }
.db-section__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.db-section__title { font-size: 1.02rem; color: #5b6270; }
.db-section__title span { font-size: .86rem; color: #8a8f99; }
.db-link {
    border: 0; background: none; cursor: pointer; padding: 4px 0;
    font-family: inherit; font-size: .98rem; font-weight: 500; color: var(--primary-color);
}
.db-link:hover { text-decoration: underline; }
.db-empty { padding: 14px 0 2px; font-size: .88rem; color: #8a8f99; }

/* holidays */
.db-holidays { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.db-holiday { display: flex; align-items: center; gap: 12px; background: #fff; border-radius: 12px; padding: 10px 12px; }
.db-holiday__date {
    width: 46px; flex: none; text-align: center; padding: 5px 0;
    border-radius: 10px; background: #f6e9ed; color: var(--primary-color); line-height: 1.1;
}
.db-holiday__date .mon { display: block; font-size: .62rem; font-weight: 700; letter-spacing: .05em; }
.db-holiday__date .day { display: block; font-size: 1.15rem; font-weight: 800; }
.db-holiday__info .name { font-size: .95rem; font-weight: 600; color: #2b2f36; }
.db-holiday__info .meta { display: flex; align-items: center; gap: 8px; font-size: .78rem; color: #8a8f99; margin-top: 3px; }
.db-chip { font-size: .68rem; font-weight: 700; padding: 1px 8px; border-radius: 999px; background: #eceef1; color: #5b6270; }

/* reminders */
.db-add { margin-top: 14px; background: #fff; border: 1px solid #e3e3e6; border-radius: 12px; overflow: hidden; }
.db-add__row { display: flex; align-items: center; gap: 10px; padding: 4px 14px; }
.db-add__row .material-symbols-rounded { font-size: 19px; color: #8a8f99; flex: none; }
.db-add__row + .db-add__row { border-top: 1px solid #ececef; }
.db-add__row input[type="text"] {
    flex: 1; min-width: 0; border: 0; outline: 0; background: transparent;
    padding: 12px 0; font-family: inherit; font-size: 1rem; color: var(--ink);
}
.db-add__row--date { padding-top: 2px; padding-bottom: 2px; }
.db-add__row--date input[type="date"] {
    flex: 1; min-width: 0; border: 0; outline: 0; background: transparent;
    padding: 10px 0; font-family: inherit; font-size: .98rem; color: var(--ink);
}
.db-add__btn {
    display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; cursor: default;
    font-family: inherit; font-size: 1rem; color: #9aa0ab; padding: 4px 0;
}
.db-add__btn .material-symbols-rounded { font-size: 26px; color: inherit; }
.db-add__btn.is-ready { cursor: pointer; color: var(--primary-color); }

.db-reminders { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.db-reminder { display: flex; align-items: center; gap: 12px; background: #fff; border-radius: 12px; padding: 11px 14px; }
.db-reminder__date {
    flex: none; font-size: .74rem; font-weight: 700; color: var(--primary-color);
    background: #f6e9ed; border-radius: 8px; padding: 3px 9px; white-space: nowrap;
}
.db-reminder__text { font-size: .94rem; color: #2b2f36; word-break: break-word; }
