/* Session modal styles (shared, non-scoped).
   Used by the preview modal in SessionList.razor and the CopySessionModal component.
   Kept here (rather than in a scoped .razor.css) so both components share the same look. */

/* ================== Clean Minimal Modal ================== */
.clean-backdrop {
    background: rgba(15, 23, 42, 0.4) !important;
    opacity: 1 !important;
}

.clean-modal-wrap {
    animation: fadeIn 0.15s ease;
}

.clean-modal {
    position: relative;
    border: 1px solid rgba(15, 23, 42, 0.06);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 20px 40px -12px rgba(15, 23, 42, 0.18);
    animation: cleanPop 0.18s ease;
    background: #fff;
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 3.5rem);
}

@keyframes cleanPop {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.clean-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: transparent;
    border: none;
    color: #6b7280;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
    z-index: 2;
}

.clean-close:hover {
    background: rgba(15, 23, 42, 0.05);
    color: #111827;
}

/* Header */
.clean-header {
    padding: 22px 24px 16px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
    flex-shrink: 0;
}

.clean-header-with-avatar {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.clean-header-body {
    flex: 1;
    min-width: 0;
}

.clean-header-actions {
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.clean-select-all {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    color: #6b7280;
    cursor: pointer;
    user-select: none;
}

.clean-select-all input[type="checkbox"] {
    width: 15px;
    height: 15px;
    accent-color: #111827;
    cursor: pointer;
}

.clean-btn-compact {
    padding: 5px 10px;
    font-size: 0.78rem;
}

/* Shift avatar (colored circle with sunrise/sun/sunset/moon icon) */
.clean-shift-avatar {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    background: rgba(15, 23, 42, 0.06);
    color: #475569;
    flex-shrink: 0;
}

.clean-shift-avatar.clean-shift-sm {
    width: 34px;
    height: 34px;
    min-width: 34px;
    border-radius: 10px;
    font-size: 1rem;
}

.clean-shift-active { background: rgba(16, 185, 129, 0.13); color: #047857; }
.clean-shift-upcoming { background: rgba(6, 182, 212, 0.15); color: #0e7490; }
.clean-shift-completed { background: rgba(59, 130, 246, 0.14); color: #1d4ed8; }
.clean-shift-neutral { background: rgba(148, 163, 184, 0.18); color: #475569; }

.clean-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6b7280;
    margin-bottom: 8px;
}

.clean-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #94a3b8;
    display: inline-block;
    flex-shrink: 0;
}

.clean-dot-active { background: #10b981; box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15); }
.clean-dot-upcoming { background: #06b6d4; }
.clean-dot-completed { background: #3b82f6; }
.clean-dot-neutral { background: #94a3b8; }

.clean-status-text {
    color: #6b7280;
}

.clean-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #111827;
    margin: 0 40px 6px 0;
    line-height: 1.35;
    letter-spacing: -0.01em;
}

.clean-subtitle {
    font-size: 0.85rem;
    color: #6b7280;
    line-height: 1.4;
}

.clean-sep {
    display: inline-block;
    margin: 0 6px;
    color: #cbd5e1;
}

.clean-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.clean-tag {
    font-size: 0.7rem;
    font-weight: 500;
    padding: 2px 8px;
    border-radius: 6px;
    background: rgba(15, 23, 42, 0.05);
    color: #475569;
}

/* Body */
.clean-body {
    padding: 18px 24px 20px;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
}

.clean-body-flush {
    padding: 0;
}

.clean-description {
    font-size: 0.9rem;
    color: #374151;
    line-height: 1.55;
    margin: 0 0 16px;
}

/* Stats — no cards, just a row of three inline numbers */
.clean-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    padding: 14px 0;
    margin-bottom: 6px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.clean-stat {
    min-width: 0;
}

.clean-stat-value {
    font-size: 1.35rem;
    font-weight: 600;
    color: #111827;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.clean-stat-label {
    font-size: 0.72rem;
    color: #6b7280;
    margin-top: 4px;
}

/* Details */
.clean-details {
    margin: 0;
    padding: 0;
}

.clean-detail-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(15, 23, 42, 0.04);
}

.clean-detail-row:last-child {
    border-bottom: none;
}

.clean-detail-row dt {
    font-size: 0.82rem;
    font-weight: 500;
    color: #6b7280;
    margin: 0;
    flex-shrink: 0;
}

.clean-detail-row dd {
    font-size: 0.88rem;
    color: #111827;
    margin: 0;
    text-align: right;
    min-width: 0;
    max-width: 65%;
}

.clean-code {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.clean-copy {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    border: none;
    background: transparent;
    color: #6b7280;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.8rem;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.clean-copy:hover {
    background: rgba(15, 23, 42, 0.06);
    color: #111827;
}

/* Footer */
.clean-footer {
    padding: 10px 16px;
    border-top: 1px solid rgba(15, 23, 42, 0.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    background: #fafafa;
    flex-shrink: 0;
}

.clean-footer-actions {
    display: flex;
    gap: 5px;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-end;
    margin-left: auto;
}

.clean-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid transparent;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
    text-decoration: none;
    line-height: 1.2;
    white-space: nowrap;
}

.clean-btn i {
    font-size: 0.85rem;
}

.clean-btn i {
    font-size: 0.9rem;
}

.clean-btn-primary {
    background: #111827;
    color: #fff;
}

.clean-btn-primary:hover {
    background: #000;
    color: #fff;
}

.clean-btn-subtle {
    background: transparent;
    color: #374151;
    border-color: rgba(15, 23, 42, 0.1);
}

.clean-btn-subtle:hover {
    background: rgba(15, 23, 42, 0.04);
    color: #111827;
}

.clean-btn-ghost {
    background: transparent;
    color: #6b7280;
    padding: 7px 10px;
}

.clean-btn-ghost:hover {
    color: #111827;
}

.clean-btn-danger {
    background: transparent;
    color: #b91c1c;
    border-color: rgba(220, 38, 38, 0.15);
}

.clean-btn-danger:hover {
    background: #dc2626;
    color: #fff;
    border-color: #dc2626;
}

/* Day list */
.clean-day-list {
    padding: 6px 0;
    max-height: 60vh;
    overflow-y: auto;
}

.clean-day-item {
    position: relative;
    display: flex;
    align-items: stretch;
    width: 100%;
    padding: 0;
    border: none;
    background: transparent;
    text-align: left;
    border-bottom: 1px solid rgba(15, 23, 42, 0.05);
    transition: background-color 0.12s ease, transform 0.12s ease;
}

/* Colored left accent bar per shift state */
.clean-day-item::before {
    content: "";
    position: absolute;
    top: 8px;
    bottom: 8px;
    left: 0;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: transparent;
    transition: background 0.15s ease;
}

.clean-day-item-accent-active::before { background: linear-gradient(180deg, #22c55e, #16a34a); }
.clean-day-item-accent-upcoming::before { background: linear-gradient(180deg, #3b82f6, #2563eb); }
.clean-day-item-accent-completed::before { background: linear-gradient(180deg, #64748b, #475569); }
.clean-day-item-accent-neutral::before { background: linear-gradient(180deg, #cbd5e1, #94a3b8); }

.clean-day-item:last-child { border-bottom: none; }

.clean-day-item.is-selected {
    background: rgba(59, 130, 246, 0.06);
}

.clean-day-item:hover {
    background: rgba(15, 23, 42, 0.035);
}

.clean-day-item.is-selected:hover {
    background: rgba(59, 130, 246, 0.09);
}

.clean-day-item-check {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px 0 20px;
    cursor: pointer;
}

.clean-day-item-check input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #111827;
    cursor: pointer;
}

.clean-day-item-main {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    flex: 1;
    min-width: 0;
    padding: 14px 22px 14px 10px;
    border: none;
    background: transparent;
    text-align: left;
    cursor: pointer;
}

.clean-day-item .clean-dot {
    width: 8px;
    height: 8px;
    flex-shrink: 0;
    margin-top: 2px;
    align-self: center;
}

.clean-day-item-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.clean-day-item-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.clean-day-item-title {
    font-size: 0.92rem;
    font-weight: 600;
    color: #0f172a;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    word-break: break-word;
}

/* Prominent time display */
.clean-day-item-time {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: #334155;
}

.clean-day-item-time > i {
    color: #64748b;
    font-size: 0.85rem;
}

.clean-time-strong {
    font-weight: 600;
    color: #0f172a;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.01em;
}

.clean-time-dur {
    display: inline-flex;
    align-items: center;
    padding: 1px 7px;
    background: rgba(15, 23, 42, 0.06);
    color: #334155;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    border-radius: 10px;
}

/* Chip row */
.clean-day-item-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.clean-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    background: #f1f5f9;
    color: #334155;
    font-size: 0.7rem;
    font-weight: 500;
    line-height: 1.5;
    border-radius: 999px;
    border: 1px solid rgba(15, 23, 42, 0.05);
}

.clean-chip i {
    font-size: 0.72rem;
    opacity: 0.85;
}

.clean-chip-shift {
    background: #eef2ff;
    color: #4338ca;
    border-color: rgba(67, 56, 202, 0.15);
}

.clean-chip-shift.clean-chip-active {
    background: #dcfce7;
    color: #15803d;
    border-color: rgba(21, 128, 61, 0.18);
}

.clean-chip-shift.clean-chip-upcoming {
    background: #dbeafe;
    color: #1d4ed8;
    border-color: rgba(29, 78, 216, 0.18);
}

.clean-chip-shift.clean-chip-completed {
    background: #e2e8f0;
    color: #475569;
    border-color: rgba(71, 85, 105, 0.2);
}

.clean-chip-attendance {
    background: #fef3c7;
    color: #92400e;
    border-color: rgba(146, 64, 14, 0.18);
    font-variant-numeric: tabular-nums;
}

/* Status badge (Active / Upcoming / etc.) */
.clean-day-item-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 9px;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    flex-shrink: 0;
    background: rgba(15, 23, 42, 0.06);
    color: #475569;
}

.clean-day-item-badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.8;
}

.clean-day-item-badge-active {
    background: rgba(34, 197, 94, 0.12);
    color: #15803d;
}

.clean-day-item-badge-active .clean-day-item-badge-dot {
    background: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.25);
    animation: clean-pulse-dot 2s ease-in-out infinite;
}

.clean-day-item-badge-upcoming {
    background: rgba(59, 130, 246, 0.12);
    color: #1d4ed8;
}

.clean-day-item-badge-completed {
    background: rgba(100, 116, 139, 0.14);
    color: #475569;
}

.clean-day-item-badge-neutral {
    background: rgba(148, 163, 184, 0.16);
    color: #64748b;
}

@keyframes clean-pulse-dot {
    0%, 100% { box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.25); }
    50% { box-shadow: 0 0 0 5px rgba(34, 197, 94, 0.05); }
}

.clean-day-item-chevron {
    color: #cbd5e1;
    font-size: 0.75rem;
    align-self: center;
    transition: transform 0.15s ease, color 0.15s ease;
    flex-shrink: 0;
}

.clean-day-item-main:hover .clean-day-item-chevron {
    color: #64748b;
    transform: translateX(2px);
}

/* Deprecated single-line meta (kept for backwards compatibility if used elsewhere) */
.clean-day-item-meta {
    font-size: 0.78rem;
    color: #6b7280;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0;
}

.clean-day-item-shift {
    font-weight: 600;
    color: #374151;
}

.clean-day-item-workmode {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-weight: 500;
    color: #475569;
}

.clean-day-item-workmode i {
    font-size: 0.75rem;
    opacity: 0.85;
}

.clean-workmode {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #111827;
    font-weight: 500;
}

.clean-workmode i {
    font-size: 0.9rem;
    color: #6b7280;
}

.clean-day-item-status {
    font-size: 0.72rem;
    font-weight: 500;
    color: #6b7280;
    padding: 2px 8px;
    border-radius: 6px;
    background: rgba(15, 23, 42, 0.05);
    flex-shrink: 0;
}

/* Empty state */
.clean-empty {
    text-align: center;
    padding: 48px 24px;
}

.clean-empty i {
    display: block;
    font-size: 2rem;
    color: #cbd5e1;
    margin-bottom: 10px;
}

.clean-empty p {
    color: #6b7280;
    font-size: 0.88rem;
    margin: 0;
}

/* Mobile refinements */
@media (max-width: 576px) {
    .clean-modal { border-radius: 12px; }
    .clean-header { padding: 20px 20px 14px; }
    .clean-body { padding: 16px 20px 18px; }
    .clean-title { font-size: 1.1rem; }
    .clean-stats { gap: 10px; }
    .clean-stat-value { font-size: 1.15rem; }
    .clean-footer { padding: 10px 12px; }
    .clean-footer-actions { gap: 4px; }
    .clean-btn { padding: 6px 8px; font-size: 0.78rem; }
    /* On phones, hide labels on non-primary footer buttons; keep icons only */
    .clean-footer-actions .clean-btn-subtle span { display: none; }
    .clean-btn-danger span { display: none; }
    .clean-day-item-check { padding-left: 14px; }
    .clean-day-item-main { padding: 12px 16px 12px 6px; }
}

/* =====================================================================
   Dark theme overrides for the enhanced day-item list
   (accent bar / status pills / time block / chips)
   ===================================================================== */
[data-bs-theme="dark"] .clean-day-item {
    border-bottom-color: rgba(255, 255, 255, 0.06);
}

[data-bs-theme="dark"] .clean-day-item.is-selected {
    background: rgba(96, 165, 250, 0.12);
}

[data-bs-theme="dark"] .clean-day-item:hover {
    background: rgba(255, 255, 255, 0.04);
}

[data-bs-theme="dark"] .clean-day-item.is-selected:hover {
    background: rgba(96, 165, 250, 0.18);
}

[data-bs-theme="dark"] .clean-day-item-title {
    color: #f1f5f9;
}

[data-bs-theme="dark"] .clean-day-item-time {
    color: #cbd5e1;
}

[data-bs-theme="dark"] .clean-day-item-time > i {
    color: #94a3b8;
}

[data-bs-theme="dark"] .clean-time-strong {
    color: #f1f5f9;
}

[data-bs-theme="dark"] .clean-time-dur {
    background: rgba(255, 255, 255, 0.08);
    color: #cbd5e1;
}

[data-bs-theme="dark"] .clean-chip {
    background: rgba(255, 255, 255, 0.05);
    color: #cbd5e1;
    border-color: rgba(255, 255, 255, 0.06);
}

[data-bs-theme="dark"] .clean-chip-shift {
    background: rgba(99, 102, 241, 0.18);
    color: #a5b4fc;
    border-color: rgba(129, 140, 248, 0.28);
}

[data-bs-theme="dark"] .clean-chip-shift.clean-chip-active {
    background: rgba(34, 197, 94, 0.18);
    color: #86efac;
    border-color: rgba(74, 222, 128, 0.28);
}

[data-bs-theme="dark"] .clean-chip-shift.clean-chip-upcoming {
    background: rgba(59, 130, 246, 0.18);
    color: #93c5fd;
    border-color: rgba(96, 165, 250, 0.28);
}

[data-bs-theme="dark"] .clean-chip-shift.clean-chip-completed {
    background: rgba(148, 163, 184, 0.18);
    color: #cbd5e1;
    border-color: rgba(148, 163, 184, 0.3);
}

[data-bs-theme="dark"] .clean-chip-attendance {
    background: rgba(251, 191, 36, 0.15);
    color: #fcd34d;
    border-color: rgba(251, 191, 36, 0.28);
}

[data-bs-theme="dark"] .clean-day-item-badge {
    background: rgba(255, 255, 255, 0.06);
    color: #cbd5e1;
}

[data-bs-theme="dark"] .clean-day-item-badge-active {
    background: rgba(34, 197, 94, 0.18);
    color: #86efac;
}

[data-bs-theme="dark"] .clean-day-item-badge-upcoming {
    background: rgba(59, 130, 246, 0.18);
    color: #93c5fd;
}

[data-bs-theme="dark"] .clean-day-item-badge-completed {
    background: rgba(148, 163, 184, 0.2);
    color: #cbd5e1;
}

[data-bs-theme="dark"] .clean-day-item-badge-neutral {
    background: rgba(148, 163, 184, 0.22);
    color: #cbd5e1;
}

[data-bs-theme="dark"] .clean-day-item-chevron {
    color: #64748b;
}

[data-bs-theme="dark"] .clean-day-item-main:hover .clean-day-item-chevron {
    color: #cbd5e1;
}

/* Legacy meta line (kept in case it's still used elsewhere) */
[data-bs-theme="dark"] .clean-day-item-meta { color: #94a3b8; }
[data-bs-theme="dark"] .clean-day-item-shift { color: #e2e8f0; }
[data-bs-theme="dark"] .clean-day-item-workmode { color: #cbd5e1; }
[data-bs-theme="dark"] .clean-day-item-status {
    background: rgba(255, 255, 255, 0.06);
    color: #cbd5e1;
}
