/* ============================================================
 * KALENDER AKADEMIK — PUBLIK
 * Path: public/assets/css/kalender-public.css
 * ============================================================ */

/* HERO */
.kal-hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #fff;
    padding: 8rem 0 3rem;
    position: relative;
    overflow: hidden;
}

.kal-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 80% 20%, rgba(245, 158, 11, 0.15) 0%, transparent 50%);
    pointer-events: none;
}

.kal-hero > div {
    position: relative;
    z-index: 1;
}

.kal-breadcrumb-link {
    color: #fbbf24;
    text-decoration: none;
    transition: color 0.2s;
}

.kal-breadcrumb-link:hover {
    color: #fcd34d;
    text-decoration: underline;
}

.kal-hero-title {
    font-size: 2.25rem;
    font-weight: 800;
    margin: 0 0 0.5rem;
    display: flex;
    align-items: center;
    gap: 12px;
}

.kal-hero-title i {
    color: #fbbf24;
}

.kal-hero-sub {
    color: #cbd5e1;
    font-size: 1rem;
    margin: 0;
}

@media (max-width: 767.98px) {
    .kal-hero { padding: 2.5rem 0 2rem; }
    .kal-hero-title { font-size: 1.5rem; }
    .kal-hero-sub { font-size: 0.9rem; }
}

/* FILTER */
.kal-select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    font-size: 14px;
    color: #334155;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.kal-select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.kal-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 20px;
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
    white-space: nowrap;
}

.kal-btn-primary:hover {
    background: #1d4ed8;
}

.kal-btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 14px;
    background: #f1f5f9;
    color: #64748b;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}

.kal-btn-secondary:hover {
    background: #e2e8f0;
    color: #334155;
}

/* CARD */
.kal-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.kal-section-title {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.kal-section-title i {
    color: #2563eb;
}

/* NAV BULAN */
.kal-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.kal-month-label {
    font-size: 1.15rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
    text-transform: capitalize;
}

.kal-nav-btn {
    background: #f1f5f9;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    color: #334155;
    cursor: pointer;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.kal-nav-btn:hover {
    background: #2563eb;
    color: #fff;
}

/* LEGEND */
.kal-legend {
    margin-bottom: 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.kal-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #475569;
}

.kal-legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    display: inline-block;
}

.kal-legend-dot.akademik { background: #3b82f6; }
.kal-legend-dot.libur    { background: #ef4444; }
.kal-legend-dot.ujian    { background: #f59e0b; }
.kal-legend-dot.kegiatan { background: #10b981; }

/* GRID */
.kal-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 1px;
    background: #e2e8f0;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
}

.kal-grid-header {
    background: #f1f5f9;
    text-align: center;
    padding: 10px 0;
    font-size: 11px;
    font-weight: 700;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.kal-cell {
    background: #fff;
    min-height: 96px;
    padding: 6px;
    transition: background 0.15s;
}

.kal-cell:hover { background: #f8fafc; }
.kal-cell.is-other { background: #f8fafc; }

.kal-cell-date {
    font-size: 12px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 4px;
}

.kal-cell.is-other .kal-cell-date { color: #cbd5e1; }

.kal-cell-events {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.kal-event-chip {
    display: block;
    font-size: 10px;
    font-weight: 500;
    color: #fff;
    padding: 3px 6px;
    border-radius: 4px;
    cursor: pointer;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    border: none;
    width: 100%;
    text-align: left;
    transition: transform 0.15s, box-shadow 0.15s;
}

.kal-event-chip:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.kal-event-akademik { background: #3b82f6; }
.kal-event-libur    { background: #ef4444; }
.kal-event-ujian    { background: #f59e0b; }
.kal-event-kegiatan { background: #10b981; }

@media (max-width: 767.98px) {
    .kal-cell { min-height: 74px; padding: 4px; }
    .kal-cell-date { font-size: 11px; }
    .kal-event-chip { font-size: 9px; padding: 2px 4px; }
    .kal-grid-header { padding: 8px 0; font-size: 10px; }
    .kal-card { padding: 14px; }
}

/* UPCOMING */
.kal-upcoming-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.kal-upcoming-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    transition: all 0.2s;
}

.kal-upcoming-item:hover {
    background: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    border-color: #e2e8f0;
}

.kal-upcoming-date {
    flex-shrink: 0;
    background: #fff;
    color: #2563eb;
    border-radius: 10px;
    padding: 8px 10px;
    text-align: center;
    line-height: 1.1;
    min-width: 52px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.kal-upcoming-akademik .kal-upcoming-date { color: #2563eb; }
.kal-upcoming-libur    .kal-upcoming-date { color: #dc2626; }
.kal-upcoming-ujian    .kal-upcoming-date { color: #d97706; }
.kal-upcoming-kegiatan .kal-upcoming-date { color: #059669; }

.kal-upcoming-day {
    display: block;
    font-size: 20px;
    font-weight: 800;
}

.kal-upcoming-month {
    display: block;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 2px;
}

.kal-upcoming-body { flex: 1; min-width: 0; }

.kal-upcoming-title {
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 3px;
}

.kal-upcoming-desc {
    font-size: 12px;
    color: #64748b;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.kal-upcoming-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.kal-upcoming-range {
    font-size: 11px;
    color: #94a3b8;
}

/* BADGE */
.badge-cat {
    font-size: 10px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 999px;
    text-transform: capitalize;
    display: inline-block;
}

.badge-cat-akademik { background: #dbeafe; color: #1e40af; }
.badge-cat-libur    { background: #ffe4e6; color: #9f1239; }
.badge-cat-ujian    { background: #fef3c7; color: #92400e; }
.badge-cat-kegiatan { background: #d1fae5; color: #065f46; }

/* MODAL */
.kal-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    z-index: 1050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    animation: kalFadeIn 0.2s ease;
}

@keyframes kalFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.kal-modal {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.25);
    max-width: 480px;
    width: 100%;
    padding: 24px;
    animation: kalSlideUp 0.25s ease;
}

@keyframes kalSlideUp {
    from { transform: translateY(16px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

.kal-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}

.kal-modal-title {
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
    flex: 1;
}

.kal-modal-close {
    background: #f1f5f9;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    flex-shrink: 0;
}

.kal-modal-close:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.kal-modal-desc {
    font-size: 14px;
    color: #475569;
    margin-bottom: 16px;
    line-height: 1.5;
}

.kal-modal-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 14px;
    border-top: 1px solid #f1f5f9;
}

.kal-modal-info-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #64748b;
}

.kal-modal-info-row i {
    color: #2563eb;
    width: 16px;
    text-align: center;
}

/* V-CLOAK */
[v-cloak] {
    display: none !important;
}