/*
Theme Name:  Astra Child
Theme URI:   https://wpastra.com/
Template:    astra
Author:      Nama Anda / Tim Developer
Description: Child theme untuk Astra
Version:     1.0.0
Text Domain: astra-child
*/


/* WRAPPER UTAMA */
.dash-cal-wrapper {
    max-width: 1100px;
    margin: 20px auto;
    font-family: 'Segoe UI', sans-serif;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

/* --- BAGIAN ATAS (GRID 2 KOLOM) --- */
.dash-cal-top {
    display: grid;
    grid-template-columns: 2fr 1fr; /* Kiri 66%, Kanan 33% */
    min-height: 400px;
}

/* KIRI: KALENDER */
.dash-cal-left {
    padding: 20px;
    background: #fff;
    border-right: 1px solid #f0f0f0;
}
.cal-nav {
    display: flex;
    justify-content: space-between;
    font-weight: bold;
    margin-bottom: 15px;
    font-size: 1.2em;
}
.cal-nav a { text-decoration: none; color: #333; }

/* Grid Hari */
.cal-days-header, .cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
}
.cal-days-header div {
    font-size: 0.85em;
    color: #999;
    padding-bottom: 10px;
}
.cal-day {
    aspect-ratio: 1/1; /* Kotak Persegi */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    border-radius: 8px;
    transition: 0.2s;
    position: relative;
}
.cal-day:hover { background: #f5f7fa; }
.cal-day.active { background: #e3f2fd; color: #0073aa; font-weight: bold; }
.cal-day.has-event .day-num { font-weight: bold; }

/* Indikator Dot Event */
.cal-day .dot {
    width: 6px;
    height: 6px;
    background: #ff5722;
    border-radius: 50%;
    margin-top: 4px;
}

/* KANAN: DETAIL PANEL */
.dash-cal-right {
    background: #f9f9f9;
    padding: 25px;
    border-left: 1px solid #eee;
}
#detail-date-title {
    margin-top: 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #ddd;
    color: #333;
}
.detail-item {
    background: #fff;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    border-left: 4px solid #0073aa;
}
.detail-item a { text-decoration: none; color: #333; font-size: 1.1em; }
.detail-item .meta { font-size: 0.9em; color: #666; margin-top: 5px; }


/* --- BAGIAN BAWAH (UPCOMING) --- */
.dash-cal-bottom {
    background: #fff;
    padding: 25px;
    border-top: 1px solid #e0e0e0;
}
.dash-cal-bottom h3 { margin-top: 0; font-size: 1.1em; color: #555; text-transform: uppercase; letter-spacing: 1px; }

.upcoming-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 15px;
}

@media(max-width:768px){
    .upcoming-grid{
        grid-template-columns: repeat(1, minmax(0, 1fr));
    }
}
/* 1. Wrapper Kartu harus 'Relative' */
.upcoming-card {
    position: relative; /* Kunci utama: agar elemen di dalamnya bisa diposisikan absolut terhadap kartu ini */
    display: flex;
    flex-direction: row;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden; /* Agar sudut gambar tumpul mengikuti radius */
    margin-bottom: 15px;
}

/* 2. Gambar Thumbnail */
.up-thumb img{
    width:100px;
    background-size: cover;
    background-position: center;
}

/* 3. Tanggal (Dipindah ke atas gambar) */
.upcoming-card .up-date {
    position: absolute; /* Lepas dari aliran teks normal */
    top: 10px;          /* Jarak dari atas */
    left: 10px;         /* Jarak dari kiri (menimpa gambar) */
    z-index: 10;        /* Pastikan layernya di atas gambar */
    
    background: rgba(0, 0, 0, 0.7); /* Latar hitam transparan */
    color: #fff;
    padding: 5px 10px;
    border-radius: 4px;
    
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    text-align: center;
    line-height: 1.2;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* 4. Konten Teks (Judul & Jam) */
.upcoming-card .up-info {
    padding: 15px 15px 15px 20px; /* Padding kiri agak besar biar rapi */
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center; /* Teks vertikal di tengah */
}

/* Kecilkan margin judul karena tanggal sudah pindah */
.upcoming-card .up-info h5 {
    margin: 0 0 5px 0;
    font-size: 16px;
}
.upcoming-card .up-info small, .small { 
    color: #888;
    font-size: 16px;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .dash-cal-top { grid-template-columns: 1fr; } /* Stack ke bawah di HP */
    .dash-cal-right { border-left: none; border-top: 1px solid #eee; min-height: 200px; }
}

/* Update style tombol navigasi */
.nav-btn.ajax-nav {
    background: #000;
    border: 1px solid #ddd;
    padding: 5px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    transition: 0.2s;
}
.nav-btn.ajax-nav:hover {
    background: #f0f0f0;
    border-color: #bbb;
}

/* Transisi halus saat loading */
#calendar-ajax-container {
    transition: opacity 0.3s ease;
}

.upcoming-card {
    display: flex; /* Biar gambar di kiri, teks di kanan */
    flex-direction: row; 
    gap: 15px;
    padding: 0; /* Reset padding */
    overflow: hidden;
}
.up-image {
    width: 100px; /* Lebar gambar tetap */
    min-height: 100px;
    background-size: cover;
    background-position: center;
    border-radius: 8px 0 0 8px; /* Lengkung kiri saja */
}
.up-content {
    padding: 10px;
    flex: 1; /* Sisa ruang untuk teks */
}