/*
 * Bimbel Custom Styles
 */

/* Override WP Admin Bar margin */
html { margin-top: 0 !important; }

/* Transitions */
.fade-enter { animation: fadeEnter 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
@keyframes fadeEnter { from { opacity: 0; transform: translateY(15px); } to { opacity: 1; transform: translateY(0); } }

/* Fix Material Symbols Layout Shift during font load */
.material-symbols-outlined {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1em;
    height: 1em;
    overflow: hidden;
    white-space: nowrap;
    font-size: inherit;
    line-height: 1;
}

/* Custom Typography */
.font-outfit { font-family: 'Outfit', sans-serif; }

/* Custom Scrollbar */
.custom-scrollbar::-webkit-scrollbar { width: 6px; height: 6px; }
.custom-scrollbar::-webkit-scrollbar-track { background: transparent; }
.custom-scrollbar::-webkit-scrollbar-thumb { background: #475569; border-radius: 10px; }
.custom-scrollbar::-webkit-scrollbar-thumb:hover { background: #64748b; }

body::-webkit-scrollbar { width: 8px; }
body::-webkit-scrollbar-track { background: #f8fafc; }
body::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 10px; }
body::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* Dashboard Cards Hover */
.stat-card { transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); }
.stat-card:hover { transform: translateY(-4px); box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.01); }

/* Sidebar Active State */
.nav-link.active { background-color: rgba(99, 102, 241, 0.15); color: #818cf8; }
.nav-link.active .material-symbols-outlined { color: #818cf8; }

/* Table Styles overrides */
.table-container { border: 1px solid #f1f5f9; border-radius: 1rem; overflow: hidden; box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02); }
.modern-table { width: 100%; border-collapse: collapse; }
.modern-table th { background-color: #f8fafc; padding: 1rem 1.25rem; text-align: left; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; color: #64748b; letter-spacing: 0.05em; border-bottom: 1px solid #f1f5f9; }
.modern-table td { padding: 1rem 1.25rem; white-space: nowrap; font-size: 0.875rem; color: #334155; border-bottom: 1px solid #f1f5f9; }
.modern-table tbody tr:hover { background-color: #f8fafc; }
.modern-table tbody tr:last-child td { border-bottom: none; }

/* Loading State for buttons */
.btn-loading { position: relative; color: transparent !important; pointer-events: none; }
.btn-loading::after { content: ''; position: absolute; left: 50%; top: 50%; width: 1.25rem; height: 1.25rem; border: 2px solid white; border-radius: 50%; border-top-color: transparent; animation: spin 1s linear infinite; transform: translate(-50%, -50%); }
@keyframes spin { to { transform: translate(-50%, -50%) rotate(360deg); } }

/* Status Badges */
.badge { display: inline-flex; align-items: center; padding: 0.25rem 0.75rem; border-radius: 9999px; font-size: 0.75rem; font-weight: 600; }
.badge-active, .badge-hadir, .badge-paid, .badge-completed { background-color: #ecfdf5; color: #059669; border: 1px solid #d1fae5; }
.badge-inactive, .badge-tidak_hadir, .badge-cancelled { background-color: #fff1f2; color: #e11d48; border: 1px solid #ffe4e6; }
.badge-izin, .badge-scheduled { background-color: #fffbeb; color: #d97706; border: 1px solid #fef3c7; }
.badge-sakit, .badge-rescheduled { background-color: #eef2ff; color: #4f46e5; border: 1px solid #e0e7ff; }
.badge-unpaid { background-color: #fff7ed; color: #ea580c; border: 1px solid #ffedd5; }

/* Bottom Navigation */
.btm-nav-link {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.2s;
}
.btm-nav-link.active {
    color: #6366f1;
}
.btm-nav-link.active .btm-nav-center-icon {
    box-shadow: 0 10px 25px -5px rgba(99, 102, 241, 0.6);
    transform: scale(1.1);
}
.safe-area-bottom {
    padding-bottom: env(safe-area-inset-bottom, 0px);
}
/* More Menu Sheet animation */
#more-menu-sheet {
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
    visibility: hidden;
}
#more-menu-sheet.show {
    transform: translateY(0);
    visibility: visible;
}
#more-menu-overlay {
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    visibility: hidden;
}
#more-menu-overlay.show {
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
}

/* Sidebar Profile Avatar */
#sidebar img.avatar,
#sidebar img[class*="avatar"] {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    min-height: 32px !important;
    flex-shrink: 0 !important;
    border-radius: 9999px !important;
    object-fit: cover !important;
}

/* Utility Classes */
.hide { display: none !important; }
