/* public/assets/css/s43-attendance-form.css
   UI-only redesign of Attendance > Add (create.php). Scoped to .att-form-card.
   No field names, routes or validation changed. */

.att-form-card {
    width: 100%;
    max-width: 760px;
    margin: 0 auto 24px 0;
    padding: 28px 28px 24px;
    border-radius: 18px;
    border: 1px solid var(--border, #e2e4e9);
    box-shadow: 0 8px 28px color-mix(in srgb, var(--text, #1a1a2e) 7%, transparent);
}
.att-form-card .att-field { margin-bottom: 20px; }

/* Labels with a small tinted icon chip */
.att-label {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: .95rem;
    color: var(--text);
}
.att-label-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    color: var(--primary, #2563eb);
    background: color-mix(in srgb, var(--primary, #2563eb) 12%, transparent);
    flex: 0 0 28px;
}
.att-label-icon svg { width: 16px; height: 16px; }

.att-form-card select,
.att-form-card textarea {
    width: 100%;
    box-sizing: border-box;
    border-radius: 12px;
    border: 1.5px solid var(--border, #e2e4e9);
    background: var(--bg, #fff);
}
.att-form-card select { min-height: 48px; }
.att-form-card textarea { min-height: 96px; padding: 12px 14px; resize: vertical; }
.att-form-card select:focus,
.att-form-card textarea:focus {
    outline: none;
    border-color: var(--primary, #2563eb);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary, #2563eb) 18%, transparent);
}

/* ── Check In / Check Out tiles ───────────────────────────── */
.att-time-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    width: 100%;
    margin-bottom: 8px;
}
.att-time-tile {
    min-width: 0;
    padding: 14px;
    border-radius: 16px;
    border: 1.5px solid var(--border, #e2e4e9);
    background: var(--surface, #f5f5f7);
    transition: border-color .15s ease, box-shadow .15s ease;
}
.att-time-tile:focus-within {
    border-color: var(--primary, #2563eb);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary, #2563eb) 16%, transparent);
}
.att-time-label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 10px;
    font-weight: 700;
    font-size: .9rem;
    color: var(--text);
}
.att-time-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    flex: 0 0 30px;
}
.att-time-icon svg { width: 16px; height: 16px; }
.att-time-in  .att-time-icon { color: var(--success, #16a34a); background: color-mix(in srgb, var(--success, #16a34a) 15%, transparent); }
.att-time-out .att-time-icon { color: var(--danger, #dc2626);  background: color-mix(in srgb, var(--danger, #dc2626) 13%, transparent); }

.att-form-card input.att-time-input {
    display: block;
    width: 100% !important;
    min-width: 0;
    box-sizing: border-box;
    height: 52px;
    padding: 0 12px;
    border-radius: 12px;
    border: 1.5px solid var(--border, #e2e4e9);
    background: var(--bg, #fff);
    color: var(--text);
    font-size: 1.15rem;
    font-weight: 600;
    text-align: center;
    font-variant-numeric: tabular-nums;
    -webkit-appearance: none;
    appearance: none;
}
.att-form-card input.att-time-input:focus {
    outline: none;
    border-color: var(--primary, #2563eb);
}
.att-form-card input.att-time-input::-webkit-calendar-picker-indicator { cursor: pointer; opacity: .7; }
[data-theme="dark"] .att-form-card input.att-time-input::-webkit-calendar-picker-indicator { filter: invert(1); }

.att-hint {
    margin: 4px 2px 22px;
    font-size: .82rem;
    line-height: 1.5;
    color: var(--text-muted, #6b7280);
}
.att-form-card .att-notice { border-radius: 12px; margin-bottom: 22px; }

/* ── Actions ──────────────────────────────────────────────── */
.att-form-actions { display: flex; gap: 12px; align-items: center; }
.att-form-actions .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 46px;
    padding: 0 26px;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
}
.att-form-actions .btn svg { width: 18px; height: 18px; }
.att-btn-save { box-shadow: 0 4px 12px color-mix(in srgb, var(--primary, #2563eb) 30%, transparent); }

/* ── Mobile: everything edge-to-edge ───────────────────────── */
@media (max-width: 767.98px) {
    .att-form-header .header-actions,
    .att-form-header .header-actions .btn { width: 100%; }
    .att-form-header .header-actions .btn { justify-content: center; }
    .att-form-card {
        max-width: 100%;
        padding: 18px 16px 16px;
        border-radius: 16px;
    }
    .att-time-grid { gap: 10px; }
    .att-time-tile { padding: 12px 10px; }
    .att-form-card input.att-time-input { height: 54px; font-size: 1.1rem; padding: 0 6px; }
    .att-form-actions {
        position: sticky;
        bottom: 0;
        z-index: 5;
        display: grid;
        grid-template-columns: 1.4fr 1fr;
        margin: 0 -16px -16px;
        padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
        background: var(--surface, #f5f5f7);
        border-top: 1px solid var(--border, #e2e4e9);
        border-radius: 0 0 16px 16px;
    }
    .att-form-actions .btn { width: 100%; height: 48px; padding: 0 12px; }
}
/* very small phones: stack Check In / Check Out full width */
@media (max-width: 349.98px) {
    .att-time-grid { grid-template-columns: 1fr; }
}

/* ── Desktop: roomier, two-column top area ─────────────────── */
@media (min-width: 992px) {
    .att-form-card { max-width: 820px; padding: 34px 36px 30px; }
    .att-time-tile { padding: 18px; }
    .att-form-card input.att-time-input { height: 56px; font-size: 1.25rem; }
}
