/* =========================================================
   Car Manager – Chi phí lăn bánh Calculator
   ========================================================= */

/* ── Wrapper ────────────────────────────────────────────── */
.clb-wrap {
    font-family: inherit;
    width: 100%;
}

/* ── Tabs ───────────────────────────────────────────────── */
.clb-tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid #D6DBE1;
    margin-bottom: 0;
}

.clb-tab {
    background: none;
    border: none;
    padding: 22px 30px;
    font-size: 20px;
    font-weight: 600;
    color: #020617;
    cursor: pointer;
    border-radius: 0;
    transition: color .2s, border-color .2s;
    text-decoration: none;
    white-space: nowrap;
}

.clb-tab:hover,
.clb-tab:focus{
    background-color: #F9FAFB;
    border-bottom: 2px solid #c49f70;
    color: #c49f70 !important;
}

.clb-tab-active {
    border-bottom: 2px solid #c49f70;
    background-color: #F9FAFB;
}

/* ── Panel ──────────────────────────────────────────────── */
.clb-panel {
    padding-top: 36px;
}

/* ── Inner 2 cột ────────────────────────────────────────── */
.clb-inner {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 32px;
    align-items: start;
}

.clb-wrap * {
    box-sizing: border-box;
}

.clb-left, .clb-right {
    min-width: 0;
    max-width: 100%;
}
.clb-left {
    position: sticky;
    top: 90px;
}

@media (max-width: 768px) {
    .clb-inner {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* ── Form card trái ─────────────────────────────────────── */
.clb-form-card {
    background: #FFF;
    border-radius: 8px;
    color: #111827;
    border: 1px solid #D6DBE1;
}

.clb-form-title {
    color: #fff;
    font-weight: 600;
    font-size: 24px;
    background-color: black;
    padding: 30px;
    text-align: center;
    border-radius: 8px 8px 0 0;
    text-align: left;
    margin: 0 !important;
    line-height: normal;
}

.clb-calculator-form {
    padding: 30px;
    padding-bottom: 40px;
    display: flex;
    flex-direction: column;
    align-items: start;
    gap: 20px;
}

.clb-field {
    display: flex;
    flex-direction: column;
    align-items: start;
    gap: 8px;
    width: 100%;
}

.clb-field div {
    width: 100%;
}

.clb-field div input {
    box-shadow: none !important;
    border-radius: 8px;
}


.clb-label {
    font-size: 18px;
}

.clb-select-wrap {
    position: relative;
    width: 100%;
}

.clb-select {
    width: 100%;
    appearance: none;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 14px 36px 14px 12px;
    font-size: 16px;
    font-family: inherit;
    color: #111827;
    cursor: pointer;
    outline: none;
    transition: border-color .2s;
    height: 52px !important;
}

.clb-select option {
    font-size: 16px !important;
}

#clb-select-car,
#clb-select-variant,
#clb-select-zone {
    font-size: 16px !important;
}

.clb-select:focus {
    border-color: #2271b1;
}

.clb-input {
    width: 100%;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 14px 12px;
    font-size: 16px;
    font-family: inherit;
    color: #111827;
    outline: none;
    height: 52px !important;
    box-sizing: border-box;
}

.clb-input:focus {
    border-color: #2271b1;
}

.clb-input-readonly {
    background: #e2e8f0;
    color: #111827;
    cursor: not-allowed;
}

.clb-select:disabled {
    background: #f3f4f6;
    color: #9ca3af;
    cursor: not-allowed;
}

.clb-input-suffix {
    display: flex;
    align-items: center;
    width: 100%;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    overflow: hidden;
}

.clb-input-suffix .clb-input {
    border: none !important;
    padding-right: 0 !important;
    flex: 1;
    min-width: 0;
}

.clb-input-suffix .clb-input:focus {
    border: none !important;
}

.clb-input-suffix:focus-within {
    border-color: #2271b1;
}

.clb-suffix {
    font-size: 16px;
    color: #6b7280;
    padding-right: 14px;
    flex-shrink: 0;
}

.clb-chevron {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: #6b7280;
    pointer-events: none;
}

/* ── Nút tính toán ──────────────────────────────────────── */
.clb-btn-calc {
    width: 100%;
    background: #f37021;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 14px 32px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    margin-top: 10px;
    transition: background .2s, opacity .2s;
}

.clb-btn-calc:hover {
    background: #c62828;
    color: #fff;
}

.clb-btn-calc:hover:not(:disabled) {
    background: #f37021;
}

.clb-btn-calc:disabled {
    background: #f37021;
    cursor: not-allowed;
    color: #fff;
    opacity: .8;
}

.clb-btn-calc:focus,
.clb-btn-calc:active {
    background: #f37021 !important;
    color: white;
}

.clb-btn-calc.clb-loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

.clb-btn-calc.clb-loading::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 24px;
    height: 24px;
    margin-left: -12px;
    margin-top: -12px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: clb-spin 0.8s linear infinite;
}

@keyframes clb-spin {
    to {
        transform: rotate(360deg);
    }
}


/* ── Placeholder ────────────────────────────────────────── */
.clb-result-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    color: #9ca3af;
    gap: 16px;
}

.clb-result-placeholder svg {
    width: 64px;
    height: 64px;
    opacity: .5;
}

.clb-result-placeholder p {
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
}

/* ── Result ─────────────────────────────────────────────── */
.clb-result {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 52px;
    width: 100%;
    min-width: 0;
    max-width: 100%;
}

/* Summary top */
.clb-result-top {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.clb-result-top-info {
    background-color: #F9FAFB;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: start;
    justify-content: space-between;
}

.clb-result-summary {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 24px;
    align-items: end;
    padding: 30px 30px 12px 30px;
}

.clb-result-meta {
    display: flex;
    flex-direction: column;
    align-items: start;
    gap: 8px;
    width: 100%;
    overflow: hidden;
}

.clb-meta-label {
    display: block;
    font-size: 14px;
    color: #6B7280;
    font-style: italic;
}

.clb-meta-variant {
    display: block;
    color: #111827;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

.clb-meta-price {
    font-size: 18px;
    color: #111827;
    text-align: end;
}

.clb-meta-loc {
    display: block;
    color: #111827;
}

.clb-result-total-box {
    width: 100%;
    background: #E7EBF0;
    padding: 16px 30px;
    display: flex;
    justify-content: end;
    border-radius: 0 0 8px 8px;
}

.clb-total-num {
    font-size: 32px;
    font-weight: 700;
    color: #111110;
    white-space: nowrap;
}

.clb-result-top-img {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.clb-result-top-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
	aspect-ratio: 16 / 9;
}

.clb-input.clb-input-readonly {
    background-color: #E1E3E4;
    border-radius: 8px;
    color: #111827;
}

@media (max-width: 600px) {
    .clb-result-top {
        flex-direction: column;
    }

    .clb-result-top-img {
        width: 100%;
    }
}

/* ── Detail title ───────────────────────────────────────── */
.clb-cost-estimate {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.clb-detail-title {
    font-size: 24px;
    font-weight: 600;
    color: #111110;
    margin: 0 !important;
}

/* ── Table ──────────────────────────────────────────────── */
.clb-table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.clb-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    margin: 0 !important;
}

.clb-table thead tr th {
    padding: 15px 24px !important;
}

.clb-table tbody tr td {
    padding: 14px 24px !important;
}

.clb-table,
.clb-table th,
.clb-table td {
    border: none !important;
}

.clb-table th,
.clb-table td {
    border-bottom: 1px solid #D6DBE1 !important;
}

.clb-table thead tr {
    border-bottom: 1px solid #6B7280;
}

.clb-table th {
    font-weight: 700;
    font-size: 18px;
    color: #111827;
    text-align: left;
    border: none !important;
}

.clb-th-right {
    text-align: right !important;
}

.clb-table td {
    color: #374151;
    border-bottom: 1px solid #f3f4f6;
    font-size: 16px;
}

.clb-text-red {
    color: #f37021 !important;
}

.clb-td-right {
    text-align: right;
}

.clb-row-bold td {
    font-weight: 700;
    font-size: 16px;
    ;
    color: #111827;
    border-top: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
}

.clb-row-grand {
    border-top: 2px solid #6B7280;
}

.clb-row-grand td {
    font-weight: 700;
    color: #f37021 !important;
    font-size: 16px;
    border-bottom: none !important;
}

.clb-table tbody .clb-row-note td{
	padding:0 24px !important;
}

.clb-row-note td{
	border:none !important;
	font-style:italic
}

/* Căn lề bảng dự toán trả góp */
#clb-panel-tra-gop .clb-table th,
#clb-panel-tra-gop .clb-table td {
    text-align: right !important;
    white-space: nowrap;
}

#clb-panel-tra-gop .clb-table th:first-child,
#clb-panel-tra-gop .clb-table td:first-child {
    text-align: center !important;
}

/* Màu chữ và font-weight cho nội dung bảng trả góp (trừ tiêu đề th) */
#clb-panel-tra-gop .clb-table tbody td {
    color: #111110 !important;
    font-weight: 600 !important;
}

#clb-panel-tra-gop .clb-table tbody td:first-child {
    color: #6B7280 !important;
    font-weight: normal !important;
}

#clb-panel-tra-gop .clb-table tfoot tr td {
    border-bottom: none !important;
}


/* ── Actions ────────────────────────────────────────────── */
.clb-actions {
    display: flex;
    gap: 24px;
}

.clb-btn-dark {
    display: inline-block;
    background: #0E1623;
    color: #fff !important;
    padding: 14px 32px;
    border-radius: 4px;
    font-size: 18px;
    font-weight: 700;
    text-decoration: none !important;
    transition: background .2s;
}

.clb-btn-dark:hover {
    background: #1f2937;
}

.clb-btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    color: #0E1623;
    border: 1px solid #D6DBE1;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 18px;
    cursor: pointer;
    transition: background .2s;
}

.clb-btn-outline:hover {
    background: #f9fafb;
    border: none !important;
    background: #1f2937;
    color: white;
}

.clb-btn-outline:hover svg path {
    stroke: white;
}

.clb-btn-outline:focus,
.clb-btn-outline:active {
    background: white;
    border: 1px solid #D6DBE1;
}


/* ── Coming soon ────────────────────────────────────────── */
.clb-coming-soon {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 60px 20px;
    gap: 16px;
    color: #9ca3af;
    text-align: center;
}

/* ── Print ──────────────────────────────────────────────── */
@media print {

    .clb-tabs,
    .clb-left,
    .clb-btn-dark,
    .clb-btn-outline {
        display: none !important;
    }

    .clb-inner {
        grid-template-columns: 1fr !important;
    }

    .clb-result {
        display: block !important;
    }

    .clb-result-placeholder {
        display: none !important;
    }
}


@media (max-width: 1200px) {
    .clb-result-top {
        grid-template-columns: 1fr;
        width: 100%;
    }
}

@media (max-width: 900px) {
    .clb-inner {
        grid-template-columns: minmax(0, 1fr);
    }

    .clb-left {
        position: static;
    }

    .clb-tab {
        padding: 15px 18px;
    }

    .clb-mobile-img {
        display: block !important;
        margin-bottom: 20px !important;
    }

    .clb-desktop-img {
        display: none !important;
    }
}

@media (max-width: 500px) {
    .clb-actions {
        flex-direction: column;
        width: 100%;
    }

    .clb-btn-dark {
        text-align: center;
    }

    .clb-btn-outline {
        justify-content: center;
    }
}

.clb-mobile-img {
    display: none;
}