/* ============================================================
   PsikoTest Online — Custom Styles
   ============================================================ */

/* ── 1. Disable Distracting Form Hover Effects ──────────────
   Website psikologi membutuhkan fokus penuh — hover effects 
   pada elemen form sangat mengganggu dan tidak profesional.
   ─────────────────────────────────────────────────────────── */

/* Input, select, textarea: hapus semua efek hover */
input:hover,
select:hover,
textarea:hover {
    transform: none !important;
    box-shadow: none !important;
    /* Hanya border focus yang subtle, tidak hover */
}

input,
select,
textarea,
button {
    font-size: 16px;
}

html,
body {
    max-width: 100%;
}

img,
svg,
canvas,
video {
    max-width: 100%;
}

/* Hapus hover shadow pada card step-guide di user dashboard */
.step-card {
    transition: none !important;
}

.step-card:hover {
    box-shadow: none !important;
    transform: none !important;
}

/* ── 2. Card Hover — lebih subtle, tidak distracting ────────
   Card statistik boleh ada hover tapi sangat halus, bukan
   naik/translate yang mengganggu fokus.
   ─────────────────────────────────────────────────────────── */

/* Override script.js card hover translate — only disable on specific containers,
   NOT on guide cards inside the blue dashboard panel */
.stat-card,
#spa-content > .grid > div:not([class*="bg-white/10"]) {
    transform: none !important;
}

/* Hanya stat card di dashboard yang boleh hover subtle */
.stat-card:hover {
    box-shadow: 0 4px 12px -2px rgba(0, 0, 0, 0.08) !important;
    transform: none !important;
}

/* ── 3. Sidebar Active Link — smooth transition ─────────────*/
aside nav a {
    transition: background-color 0.15s ease, color 0.15s ease;
}

/* ── 4. Form Focus Ring — subtle & professional ─────────────*/
input:focus,
select:focus,
textarea:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 91, 219, 0.12);
}

/* Input di auth layout (dark background) */
.bg-white\/10 input:focus,
input.bg-white\/10:focus {
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.2);
}

/* ── 5. Datetime-local input — format hint ──────────────────*/
input[type="datetime-local"] {
    font-family: inherit;
    color-scheme: light;
}

/* ── 6. Number input — no spinners for cleaner look ─────────*/
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: auto;
    margin: 0;
}

/* ── 7. Save indicator animation ────────────────────────────*/
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.save-indicator {
    animation: fadeInUp 0.2s ease-out;
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

.save-indicator.hiding {
    animation: fadeOut 0.4s ease-out forwards;
}

/* ── 8. Share modal backdrop ────────────────────────────────*/
.share-modal-backdrop {
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

/* ── 9. Accessible status badges — high contrast ────────────*/
.status-badge-terdaftar {
    background: #e2e8f0;
    color: #1e293b;
    border: 1px solid #94a3b8;
}

.status-badge-sedang {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #3b82f6;
}

.status-badge-selesai {
    background: #dcfce7;
    color: #14532d;
    border: 1px solid #22c55e;
}

.status-badge-diskualifikasi {
    background: #fee2e2;
    color: #7f1d1d;
    border: 1px solid #ef4444;
}

/* ── 10. Prevent card translate in exam navigation grid ─────*/
#nav-grid button {
    transform: none;
}

#nav-grid button.scale-105 {
    transform: scale(1.05) !important;
}

/* ── 11. iOS Mobile Input Auto-Zoom Prevention ──────────────────*/
@media (max-width: 768px) {
    main,
    #spa-content {
        min-width: 0;
    }

    table {
        min-width: max-content;
    }

    .rounded-2xl {
        border-radius: 0.75rem;
    }

    .px-6 {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    input,
    select,
    textarea {
        font-size: 16px !important;
    }
}
