/* =========================================================
   TUKLASS V5
========================================================= */

/* Search uses the user's custom A/B icon pair. */
.sidebar-link[data-page="search"] .nav-icon {
    object-fit: contain;
}

/* =========================================================
   CALENDAR V5
========================================================= */

.calendar-v5-head {
    margin-bottom: 18px;
}

.calendar-v5-status,
.reminders-v5-status {
    margin-bottom: 12px;
    padding: 11px 14px;
    border-radius: 10px;
    background: #eef5ff;
    color: #24559b;
    font-size: 12px;
}

.calendar-v5-status.error,
.reminders-v5-status.error {
    background: #fff1f0;
    color: #b3261e;
}

.calendar-v5-shell {
    display: grid;
    grid-template-columns: 205px minmax(0, 1fr) 290px;
    gap: 14px;
    align-items: start;
}

.calendar-v5-sidebar,
.calendar-v5-main,
.calendar-v5-day-panel {
    border: 1px solid #dde3e7;
    border-radius: 18px;
    background: #fff;
}

.calendar-v5-sidebar {
    position: sticky;
    top: 14px;
    padding: 14px 12px;
}

.calendar-v5-view-row,
.calendar-v5-name,
.calendar-v5-new {
    font: inherit;
    cursor: pointer;
}

.calendar-v5-view-row {
    width: 100%;
    min-height: 36px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    padding: 0 9px;
    text-align: left;
    color: #4e575e;
    font-size: 11px;
    font-weight: 850;
}

.calendar-v5-view-row.active {
    background: #f1f4f5;
    color: #111417;
}

.calendar-v5-group-title {
    margin: 18px 9px 7px;
    color: #7e878e;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .02em;
}

.calendar-v5-group-title.personal-title {
    margin-top: 20px;
}

.calendar-v5-row {
    display: grid;
    grid-template-columns: 26px minmax(0,1fr) 26px;
    align-items: center;
    min-height: 34px;
    border-radius: 8px;
}

.calendar-v5-row.active {
    background: #f5f7f8;
}

.calendar-v5-check {
    position: relative;
    display: flex;
    width: 26px;
    height: 34px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.calendar-v5-check input {
    width: 15px;
    height: 15px;
    margin: 0;
    accent-color: var(--calendar-color, #111417);
    cursor: pointer;
}

.calendar-v5-check span {
    position: absolute;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--calendar-color);
    pointer-events: none;
    opacity: 0;
}

.calendar-v5-name {
    min-width: 0;
    height: 34px;
    overflow: hidden;
    border: 0;
    background: transparent;
    padding: 0 4px;
    text-align: left;
    color: #20252a;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.calendar-v5-row.active .calendar-v5-name {
    font-weight: 850;
}

.calendar-v5-delete {
    width: 26px;
    height: 26px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #9aa1a6;
    cursor: pointer;
}

.calendar-v5-delete:hover {
    background: #fff0ef;
    color: #d93025;
}

.calendar-v5-empty-list {
    padding: 7px 9px 10px 35px;
    color: #949ba0;
    font-size: 10px;
    line-height: 1.4;
}

.calendar-v5-new {
    width: 100%;
    min-height: 36px;
    margin-top: 8px;
    border: 1px dashed #d4dade;
    border-radius: 9px;
    background: transparent;
    padding: 0 9px;
    text-align: left;
    color: #4e575e;
    font-size: 10px;
    font-weight: 850;
}

.calendar-v5-main {
    overflow: hidden;
}

.calendar-v5-toolbar {
    min-height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 16px;
    border-bottom: 1px solid #edf0f2;
}

.calendar-v5-nav {
    display: flex;
    gap: 6px;
}

.calendar-v5-nav button {
    min-width: 34px;
    height: 34px;
    border: 1px solid #dde3e7;
    border-radius: 9px;
    background: #fff;
    font: inherit;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
}

.calendar-v5-toolbar-title {
    text-align: right;
}

.calendar-v5-toolbar-title span {
    display: block;
    margin-bottom: 2px;
    color: #818990;
    font-size: 9px;
    font-weight: 800;
}

.calendar-v5-toolbar-title h2 {
    margin: 0;
    font-size: 20px;
}

.calendar-v5-weekdays,
.calendar-v5-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0,1fr));
}

.calendar-v5-weekdays {
    border-bottom: 1px solid #edf0f2;
}

.calendar-v5-weekdays span {
    padding: 9px 4px;
    color: #747d84;
    font-size: 9px;
    font-weight: 850;
    text-align: center;
}

.calendar-v5-day {
    min-height: 118px;
    overflow: hidden;
    border: 0;
    border-right: 1px solid #edf0f2;
    border-bottom: 1px solid #edf0f2;
    background: #fff;
    padding: 7px;
    text-align: left;
    cursor: pointer;
}

.calendar-v5-day:hover {
    background: #f8fafb;
}

.calendar-v5-day.other-month {
    background: #fbfcfc;
    color: #b6bcc0;
}

.calendar-v5-day.selected {
    box-shadow: inset 0 0 0 2px #1a73e8;
    background: #f7fbff;
}

.calendar-v5-day-number {
    display: inline-flex;
    width: 25px;
    height: 25px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 800;
}

.calendar-v5-day.today .calendar-v5-day-number {
    background: #1a73e8;
    color: #fff;
}

.calendar-v5-chip {
    display: block;
    margin-top: 4px;
    overflow: hidden;
    border-left: 3px solid var(--chip-color);
    border-radius: 4px;
    background: color-mix(in srgb, var(--chip-color) 12%, white);
    padding: 4px 5px;
    color: #30373c;
    font-size: 9px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.calendar-v5-more {
    display: block;
    margin-top: 4px;
    color: #727b82;
    font-size: 9px;
    font-weight: 800;
}

.calendar-v5-day-panel {
    position: sticky;
    top: 14px;
    padding: 16px;
}

.calendar-v5-day-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-bottom: 12px;
    border-bottom: 1px solid #edf0f2;
}

.calendar-v5-day-head span {
    color: #7b848b;
    font-size: 10px;
}

.calendar-v5-day-head h2 {
    margin: 2px 0 0;
    font-size: 19px;
}

.calendar-v5-day-head button,
.reminders-v5-add {
    height: 34px;
    border: 0;
    border-radius: 9px;
    background: #111417;
    color: #fff;
    padding: 0 10px;
    font: inherit;
    font-size: 10px;
    font-weight: 850;
    cursor: pointer;
}

.calendar-v5-day-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-top: 12px;
}

.calendar-v5-day-empty {
    padding: 22px 4px;
    color: #8a9298;
    font-size: 11px;
}

.calendar-v5-day-item {
    display: grid;
    grid-template-columns: 10px minmax(0,1fr) auto;
    gap: 9px;
    align-items: start;
    padding: 10px;
    border-radius: 11px;
    background: #f8fafb;
}

.calendar-v5-day-dot {
    width: 9px;
    height: 9px;
    margin-top: 3px;
    border-radius: 50%;
    background: var(--item-color);
}

.calendar-v5-day-copy strong,
.calendar-v5-day-copy span,
.calendar-v5-day-copy small {
    display: block;
}

.calendar-v5-day-copy strong {
    font-size: 12px;
}

.calendar-v5-day-copy span {
    margin-top: 3px;
    color: #6f7880;
    font-size: 10px;
}

.calendar-v5-day-copy small {
    margin-top: 4px;
    color: #8a9298;
    font-size: 9px;
}

.calendar-v5-day-copy p {
    margin: 7px 0 0;
    color: #5e676e;
    font-size: 10px;
    line-height: 1.4;
}

.calendar-v5-day-delete {
    border: 0;
    background: transparent;
    color: #d93025;
    font-size: 9px;
    font-weight: 800;
    cursor: pointer;
}

/* =========================================================
   REMINDERS V5
========================================================= */

.reminders-v5-shell {
    display: grid;
    grid-template-columns: 205px minmax(0,1fr);
    gap: 14px;
    align-items: start;
}

.reminders-v5-sidebar,
.reminders-v5-main {
    border: 1px solid #dde3e7;
    border-radius: 18px;
    background: #fff;
}

.reminders-v5-sidebar {
    position: sticky;
    top: 14px;
    padding: 14px 12px;
}

.reminders-v5-view {
    width: 100%;
    min-height: 36px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    padding: 0 9px;
    text-align: left;
    color: #4e575e;
    font: inherit;
    font-size: 11px;
    font-weight: 850;
    cursor: pointer;
}

.reminders-v5-view.active {
    background: #f1f4f5;
    color: #111417;
}

.reminders-v5-group-title {
    margin: 18px 9px 7px;
    color: #7e878e;
    font-size: 10px;
    font-weight: 900;
}

.reminders-v5-row {
    display: grid;
    grid-template-columns: 26px minmax(0,1fr);
    align-items: center;
    min-height: 34px;
    border-radius: 8px;
}

.reminders-v5-row.active {
    background: #f5f7f8;
}

.reminders-v5-check {
    position: relative;
    display: flex;
    width: 26px;
    height: 34px;
    align-items: center;
    justify-content: center;
}

.reminders-v5-check input {
    width: 15px;
    height: 15px;
    margin: 0;
    cursor: pointer;
}

.reminders-v5-check span {
    position: absolute;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--reminder-color);
    opacity: 0;
    pointer-events: none;
}

.reminders-v5-row > button {
    height: 34px;
    border: 0;
    background: transparent;
    padding: 0 4px;
    text-align: left;
    color: #20252a;
    font: inherit;
    font-size: 11px;
    cursor: pointer;
}

.reminders-v5-row.active > button {
    font-weight: 850;
}

.reminders-v5-main {
    padding: 18px;
}

.reminders-v5-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 15px;
    border-bottom: 1px solid #edf0f2;
}

.reminders-v5-toolbar span {
    color: #818990;
    font-size: 9px;
    font-weight: 800;
}

.reminders-v5-toolbar h2 {
    margin: 2px 0 0;
    font-size: 21px;
}

.reminders-v5-list {
    padding-top: 8px;
}

.reminders-v5-day {
    padding: 15px 0;
    border-bottom: 1px solid #edf0f2;
}

.reminders-v5-day:last-child {
    border-bottom: 0;
}

.reminders-v5-day h3 {
    margin: 0 0 10px;
    color: #596168;
    font-size: 11px;
}

.reminders-v5-day-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.reminders-v5-item {
    display: grid;
    grid-template-columns: 10px minmax(0,1fr) auto;
    gap: 10px;
    align-items: start;
    padding: 11px;
    border-radius: 11px;
    background: #f8fafb;
}

.reminders-v5-dot {
    width: 9px;
    height: 9px;
    margin-top: 3px;
    border-radius: 50%;
    background: var(--reminder-color);
}

.reminders-v5-item strong,
.reminders-v5-item span,
.reminders-v5-item small {
    display: block;
}

.reminders-v5-item strong {
    font-size: 12px;
}

.reminders-v5-item span {
    margin-top: 3px;
    color: #6f7880;
    font-size: 10px;
}

.reminders-v5-item small {
    margin-top: 4px;
    color: #8a9298;
    font-size: 9px;
}

.reminders-v5-item p {
    margin: 7px 0 0;
    color: #5e676e;
    font-size: 10px;
    line-height: 1.4;
}

.reminders-v5-item > button {
    border: 0;
    background: transparent;
    color: #d93025;
    font: inherit;
    font-size: 9px;
    font-weight: 800;
    cursor: pointer;
}

.reminders-v5-empty {
    min-height: 260px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    color: #818990;
    text-align: center;
    font-size: 11px;
}

.reminders-v5-empty strong {
    color: #252b30;
    font-size: 14px;
}

/* =========================================================
   NOTES LOADING FEEDBACK
========================================================= */

#notesV4Content {
    position: relative;
}

.notes-v5-loading-overlay {
    position: absolute;
    z-index: 30;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: inherit;
    background: rgba(255,255,255,.86);
    backdrop-filter: blur(2px);
}

.notes-v5-loading-card {
    display: flex;
    min-width: 190px;
    align-items: center;
    flex-direction: column;
    gap: 7px;
    padding: 20px;
    border: 1px solid #dde3e7;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(15,23,42,.08);
    text-align: center;
}

.notes-v5-loading-card strong {
    font-size: 12px;
}

.notes-v5-loading-card small {
    color: #7a838b;
    font-size: 9px;
}

.notes-v5-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid #dfe4e8;
    border-top-color: #111417;
    border-radius: 50%;
    animation: notesV5Spin .7s linear infinite;
}

.notes-v5-busy {
    opacity: .65;
    pointer-events: none;
}

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

@media (max-width: 920px) {
    .calendar-v5-shell {
        grid-template-columns: 180px minmax(0,1fr);
    }

    .calendar-v5-day-panel {
        grid-column: 1 / -1;
        position: static;
    }
}

@media (max-width: 760px) {
    .calendar-v5-shell,
    .reminders-v5-shell {
        grid-template-columns: 1fr;
    }

    .calendar-v5-sidebar,
    .reminders-v5-sidebar,
    .calendar-v5-day-panel {
        position: static;
    }

    .calendar-v5-main {
        overflow-x: auto;
    }

    .calendar-v5-weekdays,
    .calendar-v5-grid,
    .calendar-v5-toolbar {
        min-width: 680px;
    }

    .calendar-v5-sidebar {
        padding-bottom: 10px;
    }

    .calendar-v5-group-title {
        margin-top: 12px;
    }
}
