/* ============================================================
   Advance Payment for WooCommerce — Checkout Styles
   ============================================================ */

/* ── Toggle wrapper ──────────────────────────────────────────────────────── */
.apw-payment-toggle-wrap {
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 20px 24px;
    margin: 0 0 24px;
}

.apw-toggle-heading {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0 0 14px;
    padding: 0;
    border: none;
}

/* ── Mode buttons ────────────────────────────────────────────────────────── */
.apw-toggle-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.apw-mode-btn {
    flex: 1;
    min-width: 140px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 500;
    border: 2px solid #d0d0d0;
    border-radius: 5px;
    background: #fff;
    color: #555;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    line-height: 1.4;
}

.apw-mode-btn:hover {
    border-color: #96588a;
    color: #96588a;
}

.apw-mode-btn.active {
    background: #96588a;
    border-color: #96588a;
    color: #fff;
    box-shadow: 0 2px 8px rgba(150, 88, 138, 0.3);
}

.apw-mode-btn .apw-bn {
    display: block;
    font-size: 12px;
    opacity: 0.85;
    margin-top: 3px;
}

.apw-mode-btn.active .apw-bn {
    opacity: 0.9;
}

/* ── Notice text ─────────────────────────────────────────────────────────── */
.apw-notice-text {
    margin: 0 0 12px;
    font-size: 13.5px;
    line-height: 1.6;
    color: #555;
}

.apw-notice-advance {
    color: #7a5c00;
    background: #fffbea;
    border-left: 4px solid #f0c040;
    padding: 10px 14px;
    border-radius: 3px;
}

.apw-notice-full {
    color: #1d6031;
    background: #eafaf1;
    border-left: 4px solid #2ecc71;
    padding: 10px 14px;
    border-radius: 3px;
}

/* ── Breakdown table inside the toggle panel ─────────────────────────────── */
.apw-breakdown-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
    font-size: 14px;
}

.apw-breakdown-table th,
.apw-breakdown-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #ececec;
    text-align: left;
}

.apw-breakdown-table th {
    color: #666;
    font-weight: 500;
    width: 60%;
}

.apw-breakdown-table td {
    font-weight: 600;
    text-align: right;
}

/* Order Total row — neutral */
.apw-breakdown-table .apw-row-total td {
    color: #333;
}

/* You Pay Now row — green */
.apw-breakdown-table .apw-row-advance td {
    color: #1d6031;
}

/* Due on Delivery row — red */
.apw-breakdown-table .apw-row-due td {
    color: #c0392b;
}

/* Shipping note rows — subtle italic */
.apw-breakdown-table .apw-row-shipping-note th,
.apw-breakdown-table .apw-row-shipping-note td {
    color: #888;
    font-size: 12.5px;
    font-style: italic;
    font-weight: 400;
}

/* ── Loading state ───────────────────────────────────────────────────────── */
.apw-loading {
    opacity: 0.6;
    pointer-events: none;
}

/* ── Bengali font ────────────────────────────────────────────────────────── */
.apw-bn {
    font-family: 'SolaimanLipi', 'Kalpurush', Arial, sans-serif;
    font-size: 0.9em;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 480px) {
    .apw-toggle-buttons {
        flex-direction: column;
    }

    .apw-mode-btn {
        min-width: 100%;
    }
}

/* ============================================================
   Cart Page — APW Info Panel
   ============================================================ */

.apw-cart-info-row td {
    padding: 0 !important;
    border: none !important;
}

.apw-cart-panel {
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 16px 18px;
    margin: 8px 0 4px;
}

.apw-cart-panel-header {
    margin-bottom: 12px;
}

.apw-cart-panel-title {
    font-size: 14px;
    font-weight: 600;
    color: #444;
}

/* Read-only cart toggle buttons */
.apw-cart-readonly {
    margin-bottom: 12px;
}

.apw-cart-btn {
    opacity: 0.85;
    cursor: pointer;
}

.apw-cart-btn.active {
    opacity: 1;
}

.apw-cart-breakdown {
    margin-top: 8px;
}

.apw-cart-breakdown-table {
    width: 100%;
    font-size: 13px;
}

.apw-cart-breakdown-table th,
.apw-cart-breakdown-table td {
    padding: 6px 8px;
    border-bottom: 1px solid #ececec;
}

.apw-cart-note {
    font-size: 13px;
    color: #666;
    margin: 0;
    padding: 4px 0;
    line-height: 1.6;
}
