/*
 * Pemilih tanggal buatan sendiri (public/js/app-kalender.js). Tampilannya
 * sama dengan kalender di Papan Validasi Guru: pekan Sabtu - Jumat, hijau
 * sekolah untuk pilihan, merah muda untuk Jumat.
 */
.js-kalender { max-width: 360px; }

.akal-ringkas {
    display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px;
    padding: 10px 12px; margin-bottom: 10px; border-radius: 10px;
    background: #f0fdf4; border: 1px solid #bbf7d0; color: #14532d; font-size: 14px;
}
.akal-ringkas i { color: #16a34a; margin-right: 2px; }
.akal-ringkas .akal-sampai { color: #4d7c0f; font-size: 13px; }
.akal-ringkas .akal-lama {
    margin-left: auto; font-size: 12px; font-weight: 700; color: #15803d;
    background: #dcfce7; border-radius: 999px; padding: 1px 9px;
}
.akal-ringkas .akal-kosong { color: #64748b; font-size: 13px; }

.akal {
    user-select: none; border: 1px solid #e2e8f0; border-radius: 14px; padding: 14px;
    background: #fff; box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.akal-kepala { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.akal-judul { font-size: 15px; font-weight: 800; color: #0f172a; letter-spacing: -0.01em; }
.akal-nav {
    width: 32px; height: 32px; border-radius: 9px; border: 1px solid #e2e8f0; background: #fff;
    color: #334155; cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
    font-size: 12px; transition: background 0.12s, border-color 0.12s;
}
.akal-nav:hover:not(:disabled) { background: #f0fdf4; border-color: #86efac; }
.akal-nav:disabled { opacity: 0.35; cursor: not-allowed; }

.akal-hari, .akal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.akal-hari { margin-bottom: 3px; }
.akal-hari span {
    text-align: center; font-size: 11px; font-weight: 700; color: #94a3b8;
    text-transform: uppercase; letter-spacing: 0.04em; padding: 4px 0;
}
.akal-hari span.libur { color: #f87171; }

.akal-tgl {
    height: 38px; border: none; border-radius: 10px; background: transparent;
    font-size: 14px; font-weight: 600; color: #1e293b; cursor: pointer; font-family: inherit;
    font-variant-numeric: tabular-nums; transition: background 0.12s, color 0.12s;
}
.akal-tgl:hover:not(:disabled) { background: #f0fdf4; color: #15803d; }
.akal-tgl:focus-visible { outline: 2px solid #16a34a; outline-offset: 1px; }
.akal-tgl:disabled { cursor: default; }
.akal-tgl.luar { color: #e2e8f0; }
.akal-tgl.libur:not(.luar) { color: #f87171; }
.akal-tgl.hari-ini { box-shadow: inset 0 0 0 2px #86efac; color: #15803d; }
/* data-maks / data-jumat-mati: tetap terbaca sebagai tanggal, tapi jelas tidak bisa dipilih. */
.akal-tgl.mati { color: #cbd5e1; cursor: not-allowed; }
.akal-tgl.mati.libur { color: #fecaca; }

/* Rentang: badan rentang berwarna lembut, ujung-ujungnya penuh. */
.akal-tgl.antara { background: #dcfce7; color: #166534; border-radius: 4px; }
.akal-tgl.antara.pratinjau { background: #f0fdf4; color: #15803d; }
.akal-tgl.akhir.pratinjau { box-shadow: inset 0 0 0 2px #16a34a; color: #15803d; }
.akal-tgl.awal,
.akal-tgl.terpilih,
.akal-tgl.terpilih:hover {
    background: linear-gradient(135deg, #16a34a, #0b6f37); color: #fff;
    box-shadow: 0 6px 14px rgba(22, 163, 74, 0.3);
}

/* Mode bulan: dua belas bulan dalam tiga kolom, warna mengikuti tombol tanggal. */
.akal-bulan { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.akal-tgl.akal-bln { height: 42px; font-size: 13px; }

.akal-kaki {
    display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px;
    margin-top: 10px; padding-top: 10px; border-top: 1px dashed #e2e8f0; font-size: 12px; color: #94a3b8;
}
.akal-legenda { display: inline-flex; align-items: center; gap: 12px; }
.akal-legenda i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 4px; vertical-align: -1px; }
.akal-legenda .l-hari-ini { box-shadow: inset 0 0 0 2px #86efac; }
.akal-legenda .l-libur { background: #fecaca; }
.akal-aksi { display: inline-flex; gap: 4px; }
.akal-kaki button {
    background: none; border: none; color: #15803d; font-weight: 700; cursor: pointer;
    font-size: 12px; padding: 4px 8px; border-radius: 6px; font-family: inherit;
}
.akal-kaki button:hover:not(:disabled) { background: #f0fdf4; }
.akal-kaki button.akal-hapus { color: #b91c1c; }
.akal-kaki button.akal-hapus:hover:not(:disabled) { background: #fef2f2; }
.akal-kaki button:disabled { opacity: 0.5; cursor: default; }

/* data-lompat: judul bulan/tahun bisa diklik untuk memilih bulan lalu tahun. */
.akal-judul-tombol {
    border: none; background: none; padding: 4px 10px; border-radius: 9px; cursor: pointer;
    font-family: inherit; transition: background 0.12s, color 0.12s;
}
.akal-judul-tombol i { margin-left: 6px; font-size: 12px; color: #16a34a; }
.akal-judul-tombol:hover:not(:disabled) { background: #f0fdf4; color: #15803d; }
.akal-judul-tombol:focus-visible { outline: 2px solid #16a34a; outline-offset: 1px; }
.akal-judul-tombol:disabled { cursor: default; }

/* data-lipat: kalender terlipat di bawah ringkasannya sampai ringkasan diklik. */
.akal-terlipat .akal-ringkas { margin-bottom: 0; }
.akal-terlipat .akal { margin-top: 10px; }
.akal-ringkas-tombol { cursor: pointer; transition: border-color 0.12s, box-shadow 0.12s; }
.akal-ringkas-tombol:hover { border-color: #86efac; }
.akal-ringkas-tombol:focus-visible { outline: 2px solid #16a34a; outline-offset: 1px; }
.akal-ringkas .akal-panah { margin-left: auto; margin-right: 0; font-size: 12px; align-self: center; }
.akal-ringkas .akal-lama + .akal-panah { margin-left: 8px; }

/* Detail (fieldset disabled): tampil utuh tapi tidak bisa dipilih. */
fieldset:disabled .akal { background: #f8fafc; }
fieldset:disabled .akal-tgl.awal,
fieldset:disabled .akal-tgl.terpilih { box-shadow: none; }

@media (prefers-reduced-motion: reduce) {
    .akal-tgl, .akal-nav { transition: none; }
}
