/* File: style.css */
/* =======================================================
   TAMPILAN UTAMA WADAH FORMULIR
   ======================================================= */
.lkbb-container {
    font-family: 'Segoe UI', sans-serif;
    background: #f2f4f8;
    padding: 20px;
    max-width: 1000px;
    margin: auto;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.lkbb-container h2 {
    text-align: center;
    color: #007bff;
    margin-bottom: 30px;
    font-size: 24px;
}

/* =======================================================
   INPUT & DROPDOWN
   ======================================================= */
.form-group {
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.form-group > label {
    font-weight: bold;
    min-width: 140px;
    color: #333;
    user-select: none;
}

.lkbb-container select, .lkbb-container button {
    width: 100%;
    padding: 8px;
    border-radius: 7px;
    border: 1px solid #ccc;
    font-size: 16px;
    box-sizing: border-box;
}

.lkbb-container button[type="submit"] {
    background-color: #007bff;
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-top: 20px;
}

.lkbb-container button[type="submit"]:hover {
    background-color: #0056b3;
}

/* =======================================================
   KOTAK NILAI (ABA-ABA)
   ======================================================= */
.aba-container {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    gap: 10px;
}

.aba-container > label {
    font-weight: bold;
    width: 250px;
    color: #333;
    user-select: none;
}

.nilai-group {
    display: flex;
    border: 1px solid #ccc;
    border-radius: 8px;
    overflow-x: auto;
    padding: 2px 0;
    min-width: 260px;
}

.nilai-box {
    flex: 0 0 34px;
    padding: 6px 3px;
    text-align: center;
    font-weight: bold;
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
    color: #000;
    background-color: #ffffff !important;
    position: relative;
    transition: all 0.2s ease-in-out;
    border-radius: 8px;
    margin: 2px 4px;
    border: 2px solid #ccc;
}

.nilai-box:first-child { border-left: none; }

.nilai-box input[type="radio"] {
    all: unset;
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

/* Animasi saat kotak dipilih (Termasuk dari Scanner AI) */
.nilai-box.selected {
    background: #28a745 !important;
    color: #fff !important;
    border-color: #28a745 !important;
    animation: boxpop 0.2s;
}

@keyframes boxpop {
    0% { transform: scale(0.95);}
    100% { transform: scale(1);}
}

.nilai-box span {
    display: inline-block;
    width: 26px;
    height: 26px;
    line-height: 26px;
    border-radius: 4px;
    text-align: center;
    font-weight: bold;
    font-size: 15px;
    cursor: pointer;
    background: none !important;
    color: inherit !important;
}

/* Warna border berdasarkan kategori nilai */
.nilai-box.a  { border-color: #0d6efd; } /* biru */
.nilai-box.b  { border-color: #0dcaf0; } /* biru muda */
.nilai-box.c  { border-color: #ffc107; } /* kuning */
.nilai-box.k  { border-color: #fd7e14; } /* orange */
.nilai-box.sk { border-color: #dc3545; } /* merah */
.nilai-box.nol { border-color: #888; }   /* abu */

/* =======================================================
   HASIL & NOTIFIKASI
   ======================================================= */
.result {
    margin-top: 30px;
    padding: 25px;
    background: #e3f2fd;
    border-left: 6px solid #2196f3;
    border-radius: 12px;
    font-size: 18px;
    line-height: 1.6;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    text-align:center;
}

.result strong { color: #0d47a1; }

.result .total-skor {
    font-size: 28px;
    font-weight: bold;
    margin-top: 15px;
    color: #2e7d32;
    display: block;
}

.countdown {
    font-size: 22px;
    font-weight: bold;
    color: #ff5722;
    text-align: center;
    margin-top: 10px;
    animation: blink 1s step-start 0s infinite;
}

@keyframes blink { 50% { opacity: 0; } }

#notifError {
    display:none;
    margin-top: 20px;
    color: #dc3545;
    font-weight: bold;
    background: #fbeaec;
    border-left: 6px solid #dc3545;
    border-radius: 8px;
    padding: 12px;
    text-align: center;
}

/* =======================================================
   RESPONSIVENESS (MOBILE)
   ======================================================= */
@media (max-width: 900px) {
    .lkbb-container { padding: 10px; }
    .form-group { flex-direction: column; align-items: flex-start; }
    .aba-container { flex-direction: row !important; align-items: center !important; }
    .aba-container > label { width: 200px; min-width: 200px; font-size: 14px; }
    .nilai-group { flex-wrap: nowrap; overflow-x: auto; width: auto; }
}