/* ==========================================================================
   Halaman Permohonan Informasi (chat interaktif) & Lacak Status
   Dibuat menyatu dengan tema utama: memakai variabel warna Bootstrap
   yang sama (--bs-primary = merah KPI) alih-alih palet terpisah.
   ========================================================================== */

[x-cloak] {
    display: none !important;
}

.chat-page {
    background: var(--bs-light);
    min-height: 60vh;
}

.chat-wrapper {
    max-width: 720px;
    margin: 0 auto;
}

/* Header/breadcrumb bawaan template terlalu tinggi untuk halaman chat —
   dipersingkat khusus di halaman ber-layout public-chat (lihat class body
   .ppid-chat-body), tidak menyentuh halaman publik lain. */
.ppid-chat-body .bg-breadcrumb {
    padding: 70px 0 30px 0;
}

@media (min-width: 992px) {
    .ppid-chat-body .bg-breadcrumb {
        padding: 70px 0 30px 0;
    }
}

.ppid-chat-body .bg-breadcrumb h4 {
    font-size: 1.75rem;
    margin-bottom: .6rem !important;
}

/* Kotak chat: membungkus seluruh transkrip supaya terasa seperti jendela
   chat sungguhan, bukan bubble yang mengambang di halaman biasa. */
.chat-box {
    background: #fff;
    border-radius: 18px;
    border: 1px solid #eee;
    box-shadow: 0 6px 28px rgba(0, 0, 0, .08);
    overflow: hidden;
}

.chat-box-header {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .9rem 1.25rem;
    background: var(--bs-primary);
}

.chat-box-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    background: #fff;
    padding: 2px;
    flex-shrink: 0;
}

.chat-box-title {
    margin: 0;
    font-weight: 700;
    font-size: .95rem;
    color: #fff;
}

.chat-box-subtitle {
    margin: 0;
    font-size: .78rem;
    color: rgba(255, 255, 255, .85);
    display: flex;
    align-items: center;
    gap: .35rem;
}

.chat-online-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #4ade80;
    display: inline-block;
}

.chat-box-body {
    background: #f2f3f5;
    padding: 1.5rem;
    max-height: 70vh;
    overflow-y: auto;
}

@media (max-width: 575px) {
    .chat-box-body {
        padding: 1rem;
        max-height: none;
    }
}

.chat-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: 0 0 0 2px #fff, 0 1px 4px rgba(0, 0, 0, .15);
}

.chat-row {
    display: flex;
    align-items: flex-start;
    gap: .6rem;
    margin-bottom: 1rem;
}

.chat-row.chat-row-end {
    justify-content: flex-end;
}

.chat-bubble-bot {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 18px 18px 18px 4px;
    padding: .8rem 1.1rem;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .06);
    max-width: 85%;
    font-size: .95rem;
    color: #333;
}

.chat-bubble-user {
    background: var(--bs-primary);
    color: #fff;
    border-radius: 18px 18px 4px 18px;
    padding: .8rem 1.1rem;
    max-width: 85%;
    font-size: .95rem;
}

.chat-form-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 18px 18px 18px 4px;
    padding: 1.1rem 1.25rem;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .06);
    margin-left: 3rem;
    max-width: 90%;
}

.chat-quick-replies {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-left: 3rem;
    margin-bottom: 1rem;
}

.chat-quick-reply {
    border: 1.5px solid var(--bs-primary);
    color: var(--bs-primary);
    background: #fff;
    border-radius: 999px;
    padding: .5rem 1.15rem;
    font-weight: 500;
    font-size: .9rem;
    transition: all .15s ease;
}

.chat-quick-reply:hover {
    background: var(--bs-primary);
    color: #fff;
}

.chat-link-reply {
    border: 1.5px solid #ccc;
    color: #555;
    background: #fff;
    border-radius: 999px;
    padding: .5rem 1.15rem;
    font-weight: 500;
    font-size: .9rem;
    text-decoration: none;
    transition: all .15s ease;
}

.chat-link-reply:hover {
    background: #f2f2f2;
    color: #333;
}

.chat-edit-link {
    background: none;
    border: none;
    color: var(--bs-primary);
    font-size: .78rem;
    text-decoration: underline;
    padding: 0;
    flex-shrink: 0;
}

.chat-summary-row {
    padding-top: .75rem;
    margin-top: .75rem;
    border-top: 1px solid #f0f0f0;
}

.chat-summary-row:first-child {
    padding-top: 0;
    margin-top: 0;
    border-top: none;
}

/* Layar sukses */
.chat-success-card {
    background: #fff;
    border-radius: 18px;
    padding: 2.5rem 2rem;
    text-align: center;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .06);
}

.chat-success-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #e8f5e9;
    color: #198754;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin: 0 auto 1rem;
}

.chat-reg-number {
    border: 1.5px dashed var(--bs-primary);
    background: #fdecec;
    border-radius: 12px;
    padding: .9rem 1.25rem;
    font-family: var(--bs-font-monospace, monospace);
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--bs-primary);
    letter-spacing: .5px;
}

/* Stepper timeline lacak status */
.chat-stepper {
    display: flex;
    align-items: flex-start;
}

.chat-step {
    flex: 1;
    text-align: center;
}

.chat-step-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .75rem;
    font-weight: 700;
    margin: 0 auto;
    background: #e9ecef;
    color: #999;
}

.chat-step-circle.is-done {
    background: var(--bs-primary);
    color: #fff;
}

.chat-step-label {
    font-size: .75rem;
    color: #999;
    margin-top: .35rem;
}

.chat-step-label.is-done {
    color: #333;
    font-weight: 600;
}

.chat-step-line {
    flex: 1;
    height: 3px;
    background: #e9ecef;
    margin-top: 15px;
}

.chat-step-line.is-done {
    background: var(--bs-primary);
}

.chat-status-rejected {
    background: #fdecec;
    color: #b02a37;
    border-radius: 10px;
    padding: .6rem 1rem;
    font-weight: 600;
    font-size: .9rem;
}
