/* ── Schedule editor — shared between edit form and detail modal ── */

.schedule-editor {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
}

.schedule-editor__table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.schedule-editor__table thead th {
    padding: 9px 10px;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

.schedule-editor__table thead th:first-child  { width: 38%; }
.schedule-editor__table thead th:nth-child(2) { width: 26%; }
.schedule-editor__table thead th:nth-child(3),
.schedule-editor__table thead th:nth-child(4) { width: 16%; }
.schedule-editor__table thead th:last-child   { width: 4%;  }

.schedule-editor__row {
    border-bottom: 1px solid var(--border-color);
    transition: background 0.1s;
}

.schedule-editor__row:last-child {
    border-bottom: none;
}

.schedule-editor__row:hover {
    background: var(--bg-secondary);
}

.schedule-editor__cell {
    padding: 5px 4px 5px 10px;
    vertical-align: middle;
}

.schedule-editor__cell--remove {
    padding: 5px 8px 5px 2px;
    text-align: center;
    width: 32px;
}

/* ── Inputs ─────────────────────────────────────────────────────── */

.schedule-editor__input {
    width: 100%;
    border: none;
    background: transparent;
    color: var(--text-primary);
    font-size: 0.875rem;
    padding: 5px 6px;
    border-radius: 6px;
    outline: none;
    transition: background 0.15s;
    min-width: 0;
    box-shadow: none;

    /* Reset browser styling for date/time inputs */
    -webkit-appearance: none;
    appearance: none;
}

.schedule-editor__input:focus {
    background: color-mix(in srgb, var(--bs-primary) 8%, transparent);
}

/* Hide native calendar / clock picker icons */
.schedule-editor__input::-webkit-calendar-picker-indicator {
    display: none;
}

/* Firefox: hide spin buttons on time input */
.schedule-editor__input[type="time"]::-moz-focus-inner {
    border: 0;
}

.schedule-editor__input--title {
    font-weight: 500;
}

/* ── Remove button ───────────────────────────────────────────────── */

.schedule-editor__remove-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    margin: 0 auto;
    border: none;
    background: transparent;
    color: var(--text-tertiary);
    border-radius: 6px;
    cursor: pointer;
    transition: color 0.15s, background 0.15s;
    flex-shrink: 0;
    padding: 0;
}

.schedule-editor__remove-btn:hover {
    color: var(--bs-danger);
    background: rgba(var(--bs-danger-rgb), 0.1);
}

/* ── Empty state ─────────────────────────────────────────────────── */

.schedule-editor__empty {
    padding: 24px 16px;
    text-align: center;
    font-size: 0.8125rem;
    color: var(--text-tertiary);
}

/* ── Add row button ──────────────────────────────────────────────── */

.schedule-editor__add-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    padding: 10px 14px;
    border: none;
    border-top: 1px solid var(--border-color);
    background: transparent;
    color: var(--bs-primary);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s;
}

.schedule-editor__add-btn:hover {
    background: color-mix(in srgb, var(--bs-primary) 6%, transparent);
}

/* ── Responsive: hide Date column on very narrow screens ─────────── */

@media (max-width: 560px) {
    .schedule-editor__table thead th:nth-child(2),
    .schedule-editor__cell:nth-child(2) { display: none; }
    .schedule-editor__table thead th:first-child { width: 48%; }
}
