/* ============================================================
   SHIFT TEMPLATES PAGE STYLES
   Page-specific CSS for the shift templates section.
   Use tokens from tokens.css and classes from components.css.
   ============================================================ */

/* ── Empty state ─────────────────────────────────────────── */
.st-empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-secondary);
}

.st-empty-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: var(--bg-secondary, color-mix(in srgb, var(--primary) 8%, transparent));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    color: var(--primary);
    opacity: 0.7;
}

.st-empty-title {
    font-weight: 600;
    font-size: 0.95rem;
    margin: 0 0 0.35rem;
    color: var(--text-primary);
}

.st-empty-hint {
    font-size: 0.83rem;
    margin: 0;
    opacity: 0.75;
}

/* ── Card grid ───────────────────────────────────────────── */
.st-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.st-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

.st-card:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.st-card:first-child {
    padding-top: 0;
}

.st-card-icon-wrap {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: color-mix(in srgb, var(--primary) 10%, transparent);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    flex-shrink: 0;
}

.st-card-content {
    flex: 1;
    min-width: 0;
}

.st-card-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
    margin-bottom: 0.1rem;
}

.st-card-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 0.45rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.st-card-meta {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.st-hours-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--primary);
    background: color-mix(in srgb, var(--primary) 10%, transparent);
    border-radius: 20px;
    padding: 0.15rem 0.6rem;
}

.st-hours-sep {
    opacity: 0.6;
}

.st-days-row {
    display: flex;
    gap: 0.2rem;
}

.st-day-dot {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.68rem;
    font-weight: 600;
    background: var(--bg-secondary, var(--bg-primary));
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    cursor: default;
    transition: all 0.15s ease;
}

.st-day-dot.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.st-card-actions {
    display: flex;
    gap: 0.35rem;
    flex-shrink: 0;
}

/* ── Modal ───────────────────────────────────────────────── */
.st-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    width: 100%;
    max-width: 480px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
    animation: slideInUp 0.2s ease;
}

.st-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem 0;
}

.st-modal-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
    color: var(--text-primary);
}

.st-modal-body {
    padding: 1.25rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.st-modal-footer {
    padding: 0 1.5rem 1.25rem;
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
    margin-top: 0.25rem;
}

/* ── Form fields ─────────────────────────────────────────── */
.st-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.st-label {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.st-required {
    color: var(--danger, #ef4444);
}

.st-input {
    width: 100%;
    padding: 0.45rem 0.7rem;
    border: 1px solid var(--border-color);
    border-radius: 7px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 0.875rem;
    box-sizing: border-box;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.st-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary) 15%, transparent);
}

.st-time-row {
    display: flex;
    align-items: flex-end;
    gap: 0.5rem;
}

.st-time-field {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.st-time-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.st-time-sep {
    padding-bottom: 0.5rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.st-chips-row {
    display: flex;
    gap: 0.3rem;
    flex-wrap: wrap;
}

.st-chip {
    padding: 0.3rem 0.65rem;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    line-height: 1.4;
}

.st-chip:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.st-chip.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.st-form-error {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    color: var(--danger, #ef4444);
    background: color-mix(in srgb, var(--danger, #ef4444) 8%, transparent);
    border: 1px solid color-mix(in srgb, var(--danger, #ef4444) 20%, transparent);
    border-radius: 7px;
    padding: 0.5rem 0.75rem;
}
