/* ---------------------------------------------------------------------- */
/* CSS Utama: Tampilan proporsional, elegan, dan responsif */
/* ---------------------------------------------------------------------- */

body {
    font-family: 'Poppins', sans-serif;
    background-color: #f4f7f9;
    color: #333;
    display: flex;
    /* Ubah alignment agar konten utama di tengah */
    justify-content: center; 
    align-items: flex-start;
    padding: 20px;
    min-height: 100vh;
}

/* ---------------------------------------------------------------------- */
/* Kontainer utama (Digunakan di index.html, tapi ini adalah fallback CSS) */
/* ---------------------------------------------------------------------- */

.container {
    background-color: #ffffff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    width: 100%;
    /* Mengikuti max-width 900px */
    max-width: 900px; 
    margin: 0 auto 50px auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-sizing: border-box;
}

/* ---------------------------------------------------------------------- */
/* Header */
/* ---------------------------------------------------------------------- */

.header {
    text-align: center;
    margin-bottom: 30px;
    width: 100%;
}

.header-content {
    text-align: center;
}

.logo {
    width: 200px;
    height: auto;
    margin-bottom: 20px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

#sub-heading {
    color: #555;
    font-size: 1.1em;
    margin-bottom: 25px;
    padding: 15px 20px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background-color: #f9f9f9;
    font-weight: 600;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

/* ---------------------------------------------------------------------- */
/* Form Data Diri */
/* ---------------------------------------------------------------------- */

#personal-data-section {
    display: flex;
    justify-content: center;
    width: 100%;
}

#personal-data-form {
    max-width: 600px;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    margin-bottom: 8px;
    color: #444;
}

.form-group input[type="text"],
.form-group input[type="date"],
.form-group select {
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 1em;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus {
    border-color: #007bff;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
}

/* ---------------------------------------------------------------------- */
/* Tombol */
/* ---------------------------------------------------------------------- */

.button-primary {
    background-color: #007bff;
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: 600;
    transition: background-color 0.3s, transform 0.1s;
    margin-top: 10px;
}

.button-primary:hover {
    background-color: #0056b3;
}

.button-primary:active {
    transform: scale(0.98);
}

/* ---------------------------------------------------------------------- */
/* Kuesioner */
/* ---------------------------------------------------------------------- */

#question-section {
    padding-top: 20px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.question-item {
    background-color: #fefefe;
    border: 1px solid #e9ecef;
    padding: 20px;
    margin-bottom: 15px;
    border-radius: 8px;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.05);
    width: 100%;
    max-width: 700px;
    box-sizing: border-box;
}

.question-item p {
    font-size: 1em;
    margin-bottom: 15px;
    line-height: 1.6;
    font-weight: 500;
    text-align: left;
}

/* ---------------------------------------------------------------------- */
/* Likert Scale */
/* ---------------------------------------------------------------------- */

.likert-scale {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    /* Biarkan gap diatur oleh Tailwind (gap-2) di JS */
    gap: 10px; 
}

.likert-box {
    /* MENGHAPUS PROPERTI BERMASALAH */
    /* flex: 1; -> Dihapus, karena kita pakai width persentase di JS */
    /* min-width: 120px; -> DIHAPUS, INI SUMBER MASALAH UTAMA */
    /* height: 80px; -> DIHAPUS, biarkan height auto agar teks tidak keluar */
    
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    line-height: 1.3;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    background-color: #f9fafb;
    transition: all 0.2s ease-in-out;
    font-size: 0.9em;
    color: #333;
}

.likert-box:hover {
    background-color: #e5e7eb;
    cursor: pointer;
}

.likert-box.selected {
    background-color: #22c55e !important;
    color: white;
    border-color: #16a34a;
    font-weight: 600;
    box-shadow: 0 2px 5px rgba(34, 197, 94, 0.3);
}

/* ---------------------------------------------------------------------- */
/* Pesan sistem */
/* ---------------------------------------------------------------------- */

.loading-message,
.success-message,
.error-message {
    text-align: center;
    padding: 20px;
    border-radius: 8px;
    margin-top: 30px;
}

.loading-message {
    background-color: #fff3cd;
    color: #856404;
    font-weight: 600;
}

.success-message {
    background-color: #d4edda;
    color: #155724;
    font-weight: 600;
    font-size: 1.2em;
}

.error-message {
    background-color: #f8d7da;
    color: #721c24;
    font-weight: 600;
    font-size: 1.2em;
}

/* ---------------------------------------------------------------------- */
/* Responsif */
/* ---------------------------------------------------------------------- */

@media (max-width: 768px) {
    .container {
        padding: 20px;
    }

    .logo {
        width: 70%;
    }
    
    /* PENTING: Untuk layar kecil, kita tetap ingin Likert scale menjadi satu kolom agar mudah disentuh */
    /* Namun jika Anda ingin 5 kolom pada tablet: hapus section ini, dan gunakan media query lain. */
    .likert-scale {
        flex-direction: column;
        align-items: center;
    }

    .likert-box {
        width: 100%;
        height: auto;
        padding: 15px;
    }

    .question-item {
        padding: 15px;
        max-width: 100%;
    }

    #sub-heading {
        font-size: 0.95em;
        padding: 12px;
    }
}