/* Custom CSS on top of Tailwind CDN.
   Keep this file lightweight — the admin layout itself is driven by
   Tailwind utility classes in includes/admin-layout.php, so the page
   still works even if this file is stale in the browser cache. */

/* ---------- Global micro-interactions ------------------------------ */

/* Anything with a transition shown on hover gets a subtle ease. */
a, button, select, input, textarea { transition: background-color .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease, transform .15s ease; }

/* Buttons tilt back slightly on press for tactile feedback. */
button:not(:disabled):active { transform: scale(.97); }

/* Links get a gentle color dip on hover (Tailwind already does most, this is the fallback). */
a:hover { transition: color .15s ease; }

/* Smooth step transitions (customer booking flow) */
.panel { animation: fadeSlideIn 0.28s cubic-bezier(.2,.7,.3,1); }
@keyframes fadeSlideIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Service cards / staff cards / slot buttons on the customer page */
.panel button.bg-white,
.panel [data-panel] button { will-change: transform; }

/* Generic reveal for any element with .reveal */
.reveal { animation: fadeSlideIn 0.3s cubic-bezier(.2,.7,.3,1); }

/* Success check pop-in (confirmation screen) */
.success-pop { animation: popIn .4s cubic-bezier(.26,1.6,.6,.9); }
@keyframes popIn {
    0%   { opacity: 0; transform: scale(.5); }
    60%  { opacity: 1; transform: scale(1.08); }
    100% { opacity: 1; transform: scale(1); }
}

/* Skeleton shimmer for async loading */
.skeleton {
    background: linear-gradient(90deg, #f3f4f6 0%, #e5e7eb 50%, #f3f4f6 100%);
    background-size: 200% 100%;
    animation: shimmer 1.4s linear infinite;
    border-radius: 10px;
}
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- Admin sidebar nav links -------------------------------- */
.nav-link {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 12px; border-radius: 10px;
    color: #374151; text-decoration: none; font-size: 14px;
    position: relative;
}
.nav-link:hover { background: #f3f4f6; transform: translateX(2px); }
.nav-link.active {
    background: rgba(124, 58, 237, 0.10);
    color: var(--primary-color, #7c3aed);
    font-weight: 600;
}
.nav-link.active::before {
    content: ""; position: absolute; left: 0; top: 8px; bottom: 8px;
    width: 3px; border-radius: 2px; background: var(--primary-color, #7c3aed);
}

/* Sidebar nav scroll customization */
nav.overflow-y-auto::-webkit-scrollbar { width: 6px; }
nav.overflow-y-auto::-webkit-scrollbar-thumb { background: #e5e7eb; border-radius: 3px; }

/* ---------- Toast notifications ------------------------------------ */
#toastRoot {
    position: fixed; top: 16px; right: 16px; z-index: 100;
    display: flex; flex-direction: column; gap: 10px;
    pointer-events: none;
    max-width: min(92vw, 380px);
}
.toast {
    pointer-events: auto;
    background: #fff; border: 1px solid #e5e7eb;
    border-radius: 12px; padding: 12px 14px;
    display: flex; gap: 10px; align-items: flex-start;
    box-shadow: 0 10px 30px rgba(17, 24, 39, 0.12);
    animation: toastIn .25s ease-out;
    font-size: 14px; color: #111827;
}
.toast.info    { border-left: 4px solid #3b82f6; }
.toast.success { border-left: 4px solid #10b981; }
.toast.warn    { border-left: 4px solid #f59e0b; }
.toast.error   { border-left: 4px solid #ef4444; }
.toast .toast-icon { flex-shrink: 0; width: 20px; height: 20px; margin-top: 2px; }
.toast.info    .toast-icon { color: #3b82f6; }
.toast.success .toast-icon { color: #10b981; }
.toast.warn    .toast-icon { color: #f59e0b; }
.toast.error   .toast-icon { color: #ef4444; }
.toast .toast-body { flex: 1; word-break: break-word; }
.toast .toast-close {
    background: none; border: 0; cursor: pointer; padding: 2px 6px;
    color: #9ca3af; font-size: 16px; line-height: 1;
}
.toast.leaving { animation: toastOut .2s ease-in forwards; }
@keyframes toastIn  { from { opacity: 0; transform: translate(20px, -6px); } to { opacity: 1; transform: translate(0, 0); } }
@keyframes toastOut { to   { opacity: 0; transform: translate(30px, 0); } }

/* Modal: fade + scale in */
.modal-backdrop { animation: backdropIn .2s ease-out; }
.modal { animation: modalIn .25s cubic-bezier(.2,.7,.3,1); }
@keyframes backdropIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalIn    { from { opacity: 0; transform: scale(.95) translateY(8px); } to { opacity: 1; transform: scale(1) translateY(0); } }

/* ---------- Modal base -------------------------------------------- */
.modal-backdrop {
    position: fixed; inset: 0; background: rgba(17,24,39,0.45);
    display: flex; align-items: center; justify-content: center;
    z-index: 60; padding: 16px;
}
.modal {
    background: #fff; border-radius: 14px; padding: 20px; width: 100%; max-width: 480px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}

/* ---------- Calendar ---------------------------------------------- */
.calendar-scroll { overflow: auto; max-height: calc(100vh - 220px); }
canvas { max-width: 100%; }
