/**
 * MILS Technologies - Unified Checkout Voucher Component CSS
 * Clean White Minimalist & Seamless Integration
 */

.mils-checkout-voucher-wrapper {
    margin: 18px 0 24px 0 !important;
    width: 100% !important;
}

.mils-voucher-box-card {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 14px !important;
    padding: 18px 20px !important;
    box-shadow: 0 4px 16px -2px rgba(0, 0, 0, 0.03) !important;
    transition: all 0.2s ease !important;
}

.mils-voucher-box-card:focus-within {
    border-color: #cbd5e1 !important;
    box-shadow: 0 6px 20px -2px rgba(0, 0, 0, 0.05) !important;
}

.mils-voucher-header {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    margin-bottom: 14px !important;
}

.mils-voucher-icon-badge {
    width: 34px !important;
    height: 34px !important;
    border-radius: 9px !important;
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #0f172a !important;
    flex-shrink: 0 !important;
}

.mils-voucher-title-wrap {
    flex: 1 !important;
}

.mils-voucher-title {
    font-size: 14px !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    margin: 0 0 2px 0 !important;
    line-height: 1.3 !important;
    font-family: inherit !important;
}

.mils-voucher-subtitle {
    font-size: 12px !important;
    color: #64748b !important;
    margin: 0 !important;
    line-height: 1.3 !important;
}

.mils-voucher-field-wrap {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    position: relative !important;
}

.mils-voucher-input {
    flex: 1 !important;
    height: 44px !important;
    min-height: 44px !important;
    line-height: 44px !important;
    padding: 0 14px !important;
    background: #f8fafc !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 9px !important;
    font-size: 13.5px !important;
    color: #0f172a !important;
    transition: all 0.2s ease !important;
    outline: none !important;
    box-shadow: none !important;
    text-transform: uppercase !important;
}

.mils-voucher-input::placeholder {
    text-transform: none !important;
    color: #94a3b8 !important;
}

.mils-voucher-input:focus {
    background: #ffffff !important;
    border-color: #0f172a !important;
    box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.08) !important;
}

.mils-btn-apply-voucher {
    height: 44px !important;
    min-height: 44px !important;
    padding: 0 22px !important;
    background: #0f172a !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 9px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.15s ease !important;
    white-space: nowrap !important;
}

.mils-btn-apply-voucher:hover {
    background: #1e293b !important;
    color: #ffffff !important;
    transform: translateY(-1px) !important;
}

.mils-btn-apply-voucher:disabled {
    opacity: 0.65 !important;
    cursor: not-allowed !important;
    transform: none !important;
}

/* Spinner Icon */
.mils-spin-icon {
    animation: milsVoucherSpin 0.8s linear infinite !important;
}

@keyframes milsVoucherSpin {
    100% {
        transform: rotate(360deg);
    }
}

/* Feedback Box */
.mils-voucher-feedback {
    margin-top: 12px !important;
    padding: 10px 14px !important;
    border-radius: 8px !important;
    font-size: 12.5px !important;
    line-height: 1.4 !important;
    display: none;
}

.mils-voucher-feedback.success {
    background: #ecfdf5 !important;
    border: 1px solid #a7f3d0 !important;
    color: #047857 !important;
    display: block !important;
}

.mils-voucher-feedback.error {
    background: #fef2f2 !important;
    border: 1px solid #fecaca !important;
    color: #b91c1c !important;
    display: block !important;
}

/* Sembunyikan pesan toggle kupon bawaan WooCommerce jika ada */
.woocommerce-form-coupon-toggle {
    display: none !important;
}
form.woocommerce-form-coupon {
    display: none !important;
}

/* ==============================================================
   HUSH VOUCHER CODE (REPLACE WITH 'Mils Voucher' LIKE IN CART)
============================================================== */
.woocommerce-checkout tr.cart-discount th {
    display: none !important;
}

.woocommerce-checkout tr.cart-discount:before {
    content: 'Mils Voucher' !important;
    display: table-cell !important;
    font-size: 0.9em !important;
    font-weight: 600 !important;
    letter-spacing: 0 !important;
    text-transform: inherit !important;
    border-bottom: 1px solid #ececec !important;
    line-height: 2.05 !important;
    padding: 10px 5px !important;
    color: #333333 !important;
    vertical-align: middle !important;
}

/* Sembunyikan string nama kode kupon di kolom deskripsi diskon, sisakan nominal diskon & tombol remove */
.woocommerce-checkout tr.cart-discount td {
    position: relative !important;
    text-align: right !important;
}

/* Tombol hapus kupon / voucher */
.woocommerce-checkout tr.cart-discount .woocommerce-remove-coupon {
    margin-left: 8px !important;
    font-size: 11px !important;
    color: #ef4444 !important;
    text-decoration: underline !important;
    font-weight: normal !important;
}


