/* ============================================================
   Win11 Date Picker – Fluent Design Calendar
   Mimics the Windows 11 Taskbar Calendar (bottom-right corner)
   ============================================================ */

/* ---------- Popup Container ---------- */
.w11dp-popup {
    position: absolute;
    z-index: 9999;
    width: 320px;
    background: rgba(243, 243, 243, 0.86);
    backdrop-filter: blur(24px) saturate(1.8);
    -webkit-backdrop-filter: blur(24px) saturate(1.8);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.18),
        0 2px 8px rgba(0, 0, 0, 0.08);
    font-family: 'Segoe UI', 'Inter', system-ui, -apple-system, sans-serif;
    color: #1a1a1a;
    overflow: hidden;
    /* Hidden by default */
    opacity: 0;
    transform: translateY(6px) scale(0.97);
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.w11dp-popup.w11dp-open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

/* ---------- Clock Header ---------- */
.w11dp-clock-section {
    padding: 16px 20px 10px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.w11dp-time {
    font-size: 2.4rem;
    font-weight: 600;
    letter-spacing: -1px;
    line-height: 1.1;
    color: #1a1a1a;
}

.w11dp-date-line {
    font-size: 0.82rem;
    color: #555;
    margin-top: 2px;
}

.w11dp-lunar-line {
    font-size: 0.78rem;
    color: #0067c0;
    margin-top: 1px;
}

/* ---------- Navigation Header ---------- */
.w11dp-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px 4px;
}

.w11dp-nav-title {
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    padding: 4px 10px;
    border-radius: 4px;
    transition: background 0.15s;
    user-select: none;
    color: #1a1a1a;
}

.w11dp-nav-title:hover {
    background: rgba(0, 0, 0, 0.05);
}

.w11dp-nav-arrows {
    display: flex;
    gap: 2px;
}

.w11dp-nav-btn {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 4px;
    color: #555;
    font-size: 0.7rem;
    transition: background 0.15s;
}

.w11dp-nav-btn:hover {
    background: rgba(0, 0, 0, 0.06);
}

/* ---------- Day View ---------- */
.w11dp-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    padding: 0 8px;
    margin-bottom: 2px;
}

.w11dp-weekday {
    text-align: center;
    font-size: 0.72rem;
    font-weight: 600;
    color: #888;
    padding: 4px 0;
    user-select: none;
}

.w11dp-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    padding: 0 8px 8px;
    gap: 1px;
}

.w11dp-day-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 48px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.12s;
    position: relative;
    user-select: none;
}

.w11dp-day-cell:hover {
    background: rgba(0, 0, 0, 0.04);
}

.w11dp-day-cell.w11dp-other-month {
    opacity: 0.38;
}

.w11dp-day-cell.w11dp-today:not(.w11dp-selected) .w11dp-day-num {
    border: 1px solid #0067c0;
    color: #0067c0;
    border-radius: 50%;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.w11dp-day-cell.w11dp-selected .w11dp-day-num {
    background: #0067c0;
    color: #fff;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.w11dp-day-num {
    font-size: 0.82rem;
    font-weight: 400;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.w11dp-day-sub {
    font-size: 0.58rem;
    color: #888;
    line-height: 1;
    margin-top: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 38px;
    text-align: center;
}

.w11dp-day-cell.w11dp-today .w11dp-day-sub,
.w11dp-day-cell.w11dp-selected .w11dp-day-sub {
    color: #0067c0;
}

.w11dp-day-sub.w11dp-holiday {
    color: #c42b1c;
    font-weight: 600;
}

.w11dp-day-sub.w11dp-solar-term {
    color: #0067c0;
    font-weight: 500;
}

.w11dp-day-sub.w11dp-lunar-month {
    color: #333;
    font-weight: 600;
}

/* ---------- Month View ---------- */
.w11dp-months {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    padding: 8px 12px 12px;
    gap: 4px;
}

.w11dp-month-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 56px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.88rem;
    font-weight: 400;
    transition: background 0.12s;
    user-select: none;
}

.w11dp-month-cell:hover {
    background: rgba(0, 0, 0, 0.04);
}

.w11dp-month-cell.w11dp-current-month span {
    background: #0067c0;
    color: #fff;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.w11dp-month-cell.w11dp-other-year {
    opacity: 0.38;
}

/* ---------- Decade View ---------- */
.w11dp-years {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    padding: 8px 12px 12px;
    gap: 4px;
}

.w11dp-year-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 56px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.88rem;
    font-weight: 400;
    transition: background 0.12s;
    user-select: none;
}

.w11dp-year-cell:hover {
    background: rgba(0, 0, 0, 0.04);
}

.w11dp-year-cell.w11dp-current-year span {
    background: #0067c0;
    color: #fff;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.82rem;
}

.w11dp-year-cell.w11dp-other-decade {
    opacity: 0.38;
}

/* ---------- Focus Section (Bottom) ---------- */
.w11dp-focus-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 14px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.w11dp-focus-timer {
    display: flex;
    align-items: center;
    gap: 8px;
}

.w11dp-focus-btn {
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(0, 0, 0, 0.12);
    background: transparent;
    cursor: pointer;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
    color: #555;
    transition: background 0.12s;
}

.w11dp-focus-btn:hover {
    background: rgba(0, 0, 0, 0.04);
}

.w11dp-focus-mins {
    font-size: 0.82rem;
    font-weight: 500;
    color: #1a1a1a;
    min-width: 56px;
    text-align: center;
}

.w11dp-focus-start {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    background: transparent;
    cursor: pointer;
    border-radius: 4px;
    font-size: 0.78rem;
    font-weight: 500;
    color: #1a1a1a;
    transition: background 0.12s;
}

.w11dp-focus-start:hover {
    background: rgba(0, 0, 0, 0.04);
}

/* ---------- View transitions ---------- */
.w11dp-view-container {
    position: relative;
    min-height: 290px;
}

.w11dp-view {
    animation: w11dp-fadeIn 0.15s ease;
}

@keyframes w11dp-fadeIn {
    from { opacity: 0; transform: scale(0.97); }
    to   { opacity: 1; transform: scale(1); }
}
