/* public/assets/css/order-form.css - "Polished & Trustworthy" Theme */

/* PENAMBAHAN: Keyframes untuk animasi shake */
@keyframes shake {
  10%, 90% { transform: translate3d(-1px, 0, 0); }
  20%, 80% { transform: translate3d(2px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
  40%, 60% { transform: translate3d(4px, 0, 0); }
}

/* PENAMBAHAN: Gaya untuk kontrol form yang tidak valid */
.choices.is-invalid .choices__inner,
.form-control.is-invalid {
    border-color: #dc3545 !important; /* Warna merah untuk error */
    animation: shake 0.5s;
}

body {
    /* Latar belakang yang lebih lembut untuk menonjolkan kartu */
    background-color: #f1f3f5; 
}

.secure-checkout-container {
    padding: 2rem 0;
}

/* --- Header Formulir --- */
.checkout-form .form-header {
    margin-bottom: 1.5rem;
    padding-left: 0.5rem;
}
.checkout-form .form-title {
    font-weight: 700;
    font-size: 1.8rem; /* Sedikit lebih besar */
    color: #212529; /* Warna hitam yang lebih lembut */
    display: flex;
    align-items: center;
}
.checkout-form .form-title i {
    color: #20c997; /* Warna hijau mint yang lebih cerah */
    margin-right: 0.85rem;
    font-size: 1.7rem;
}
.checkout-form .form-subtitle {
    color: #6c757d;
    font-size: 1rem;
}

/* --- Kartu Formulir Utama --- */
.checkout-form form {
    background-color: #ffffff;
    border: 1px solid #e9ecef; /* Border yang lebih halus */
    border-radius: 1rem; /* Sudut yang lebih bulat */
    padding: 2.5rem; /* Padding lebih besar */
    box-shadow: 0 8px 30px rgba(0,0,0,0.06);
}

.checkout-form .form-section {
    margin-bottom: 1.75rem; /* Jarak antar bagian lebih besar */
    padding-bottom: 0;
    border-bottom: none; /* Hapus garis pemisah, gunakan spasi */
}

/* Hapus margin pada bagian terakhir */
.checkout-form form .form-section:last-of-type {
    margin-bottom: 0;
}

.checkout-form .form-label {
    font-weight: 600; /* Label lebih tebal */
    color: #495057;
    margin-bottom: 0.6rem;
    font-size: 0.9rem;
}

/* --- Gaya Input yang Disempurnakan --- */
.checkout-form .input-group-text {
    background-color: #f8f9fa;
    border: 1px solid #ced4da;
    border-right: none; /* Hapus border kanan agar menyatu */
    color: #495057;
    padding: 0 1rem;
    border-radius: 0.5rem 0 0 0.5rem;
    transition: all 0.2s ease-in-out;
}
.checkout-form .form-control,
.checkout-form .form-select {
    border: 1px solid #ced4da;
    padding: 0.8rem 1rem;
    font-size: 1rem;
    border-radius: 0.5rem;
    transition: all 0.2s ease-in-out;
}
/* Penyesuaian untuk input dengan ikon */
.checkout-form .input-group .form-control {
    border-left: none;
    border-radius: 0 0.5rem 0.5rem 0;
}

.checkout-form .form-control:focus,
.checkout-form .form-select:focus {
    border-color: #ee4d2d;
    box-shadow: 0 0 0 3px rgba(238, 77, 45, 0.1);
    z-index: 3; /* Pastikan input berada di atas saat fokus */
}
.checkout-form .input-group:focus-within .input-group-text {
    border-color: #ee4d2d;
    color: #ee4d2d;
}

/* PERUBAHAN: Gaya untuk placeholder agar lebih samar */
.checkout-form .form-control::placeholder { /* Chrome, Firefox, Opera, Safari 10.1+ */
  color: #adb5bd; /* Warna abu-abu yang lebih terang */
  opacity: 1; /* Firefox butuh ini */
}

.checkout-form .form-control:-ms-input-placeholder { /* Internet Explorer 10-11 */
  color: #adb5bd;
}

.checkout-form .form-control::-ms-input-placeholder { /* Microsoft Edge */
  color: #adb5bd;
}


/* --- Kartu Ringkasan (Kanan) --- */
.summary-card {
    background-color: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 1rem;
    padding: 1.75rem;
    position: sticky;
    top: 100px;
    z-index: 1019;
    box-shadow: 0 8px 30px rgba(0,0,0,0.06);
}

.summary-card .summary-title {
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: #212529;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 1rem;
}

.summary-product {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}
.summary-product-img {
    width: 60px;
    height: 60px;
    border-radius: 0.75rem;
    object-fit: cover;
    margin-right: 1rem;
    border: 1px solid #e9ecef;
}
.summary-product-name {
    font-weight: 600;
    margin-bottom: 0.1rem;
    line-height: 1.3;
    color: #343a40;
}
.summary-product-category {
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 0;
}

.summary-details-grid {
    display: grid;
    gap: 1rem;
    font-size: 0.95rem;
}
.summary-detail-item {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1rem;
    align-items: start;
}
.summary-detail-label {
    color: #6c757d;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}
.summary-detail-value {
    font-weight: 600;
    color: #343a40;
    text-align: right;
    word-break: break-all;
    line-height: 1.4;
}

.summary-total {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-weight: 700;
    font-size: 1.1rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
}
.summary-total .total-price {
    color: #ee4d2d;
    font-size: 1.6rem;
}

/* --- Tombol & Badge Keamanan --- */
.btn-submit-order {
    background: linear-gradient(45deg, #ff6b6b, #ee4d2d);
    color: #fff;
    border: none;
    padding: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 0.75rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(238, 77, 45, 0.25);
}
.btn-submit-order:hover {
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 7px 25px rgba(238, 77, 45, 0.35);
}

.secure-badge {
    text-align: center;
    margin-top: 1.5rem;
    color: #6c757d;
    font-size: 0.9rem;
}
.secure-badge i {
    color: #20c997;
    margin-right: 0.35rem;
    font-size: 1rem;
}

/* Penyesuaian Responsif */
@media (max-width: 991.98px) {
    .summary-card {
        margin-top: 2.5rem;
        position: static;
    }
    .checkout-form form {
        padding: 1.5rem;
    }
}

/* --- Style untuk Varian Jumlah --- */
.quantity-variants {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1rem;
}
.quantity-variant-btn {
    background-color: #f1f3f5;
    border: 1px solid #dee2e6;
    border-radius: 25px;
    padding: 0.5rem 1.25rem;
    font-weight: 600;
    color: #495057;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}
.quantity-variant-btn:hover {
    background-color: #e9ecef;
    border-color: #ced4da;
}
.quantity-variant-btn.active {
    background-color: #ee4d2d;
    color: #fff;
    border-color: #ee4d2d;
    box-shadow: 0 4px 10px rgba(238, 77, 45, 0.2);
    transform: translateY(-2px);
}

/* --- Gaya untuk Dropdown Kustom (Choices.js) --- */
.checkout-form .custom-filter-group {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.checkout-form .filter-icon {
    position: absolute;
    left: 1rem;
    z-index: 10;
    color: #6c757d;
    pointer-events: none;
}

.checkout-form .custom-filter-group .choices__inner {
    padding-left: 2.8rem !important;
    border-radius: 0.5rem;
    border: 1px solid #ced4da;
    background-color: #fff;
    padding-top: 0.8rem;
    padding-bottom: 0.8rem;
    font-size: 1rem;
}

.checkout-form .custom-filter-group .choices {
    width: 100%;
}

.choices__list--dropdown {
    z-index: 20;
}

.choices[data-type*="select-one"].is-open .choices__inner {
    border-radius: 0.5rem 0.5rem 0 0;
}

.choices__item--choice.is-highlighted {
    background-color: #fef3f1;
}

/* PERUBAHAN: Gaya baru untuk badge info Min/Maks */
.quantity-info-badges {
    display: flex;
    gap: 0.5rem; /* Jarak antar badge */
    align-items: center;
}

.badge-min-max {
    background-color: #ee4d2d; /* Warna oranye utama */
    color: #ffffff; /* Teks putih */
    padding: 0.4em 0.9em;
    border-radius: 25px; /* Membuatnya sangat bulat seperti pil */
    font-size: 0.85rem;
    font-weight: 500;
}

.badge-min-max strong {
    font-weight: 700; /* Angka tetap tebal */
}
