/* =========================================================
   CTBS Courier Addon — Stylesheet
   ========================================================= */

/* ---- Parcel form wrapper -------------------------------- */
#ctbs-ca-parcel-wrap .accordion-header {
    border: 1px solid #000;
    text-transform: uppercase;
    padding: 14px 21px 15px 21px;
    cursor: pointer;
}

#ctbs-ca-parcel-wrap .accordion-header .chbs-meta-icon-arrow-vertical-large {
    float: right;
    margin: 5px;
    transform: scaleY(-1);
}

/* #ctbs-ca-parcel-wrap .accordion-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

#ctbs-ca-parcel-wrap .accordion-body.open {
  max-height: 600px;
} */

#ctbs-ca-parcel-wrap.accordion-item {
    margin-bottom: 24px;
}

.ctbs-ca-wrap {
    padding: 20px 24px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
}

.ctbs-ca-title {
    margin: 0 0 4px;
    font-size: 16px;
    font-weight: 600;
    color: #111827;
}

.ctbs-ca-subtitle {
    margin: 0 0 16px;
    font-size: 13px;
    color: #6b7280;
}

/* ---- 4-column grid ------------------------------------- */
.ctbs-ca-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 14px;
}

.ctbs-ca-label {
    display: flex;
    flex-direction: column;
    flex: 1 1 120px;
    gap: 4px;
    font-size: 13px;
    color: #374151;
    font-weight: 500;
}

.ctbs-ca-label input[type="number"] {
    padding: 7px 10px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 14px;
    width: 100%;
    box-sizing: border-box;
    background: #fff;
    transition: border-color 0.15s;
}

.ctbs-ca-label input[type="number"]:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37,99,235,0.15);
}

/* ---- Calculate button ---------------------------------- */
.ctbs-ca-btn {
    display: inline-block;
    padding: 9px 20px;
    background: #2563eb;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    /* transition: background 0.15s; */
}

.ctbs-ca-btn:hover {
    background: #1d4ed8;
}

.ctbs-ca-btn:disabled {
    background: #93c5fd;
    cursor: default;
}

/* ---- Results area ------------------------------------- */
#ctbs-ca-results {
    margin-top: 16px;
}

.ctbs-ca-results-inner {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ---- Tables ------------------------------------------- */
.ctbs-ca-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.ctbs-ca-table th,
.ctbs-ca-table td {
    padding: 7px 10px;
    border: 1px solid #e5e7eb;
    text-align: left;
    vertical-align: middle;
}

.ctbs-ca-table th {
    background: #f3f4f6;
    color: #374151;
    font-weight: 600;
    white-space: nowrap;
}

.ctbs-ca-table--info th {
    width: 180px;
}

/* ---- Row states --------------------------------------- */
.ctbs-ca-eligible {
    background: #fff;
}

.ctbs-ca-ineligible {
    background: #fff7f7;
    color: #9ca3af;
}

.ctbs-ca-best-row {
    background: #f0fdf4 !important;
}

.ctbs-ca-best-row td,
.ctbs-ca-best-row th {
    font-weight: 600;
}

/* ---- Status badges ------------------------------------ */
.ctbs-ca-status-ok {
    color: #16a34a;
}

.ctbs-ca-status-no {
    color: #9ca3af;
    font-style: italic;
}

.ctbs-ca-badge {
    display: inline-block;
    padding: 1px 7px;
    background: #16a34a;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    border-radius: 10px;
    margin-left: 6px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ---- Message states ----------------------------------- */
.ctbs-ca-msg {
    padding: 10px 14px;
    border-radius: 4px;
    font-size: 13px;
}

.ctbs-ca-msg--warning {
    background: #fffbeb;
    border: 1px solid #fcd34d;
    color: #92400e;
}

.ctbs-ca-msg--error {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    color: #991b1b;
}

/* ---- Summary block (admin / frontend / woocommerce) --- */
.ctbs-ca-summary {
    margin: 16px 0;
    padding: 16px 20px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
}

.ctbs-ca-summary--admin {
    background: #fff;
}

.ctbs-ca-summary-title {
    margin: 0 0 12px;
    font-size: 15px;
    font-weight: 600;
    color: #111827;
}

.ctbs-ca-details {
    margin-top: 10px;
}

.ctbs-ca-details summary {
    cursor: pointer;
    font-size: 13px;
    color: #6b7280;
    padding: 4px 0;
}

.ctbs-ca-details[open] summary {
    color: #374151;
    font-weight: 600;
}

.ctbs-ca-price {
    color: #16a34a;
}

/* ---- Responsive --------------------------------------- */
@media (max-width: 600px) {
    .ctbs-ca-row {
        flex-direction: column;
    }

    .ctbs-ca-table {
        font-size: 12px;
    }

    .ctbs-ca-table th,
    .ctbs-ca-table td {
        padding: 5px 7px;
    }
}
