/**
 * Personal Loan Net Disbursal Comparison Calculator Styles
 * Personal Loan Net Proceeds Comparison Calculator Styles
 */

.pldc-hidden,
.pldc-waiting[hidden] {
    display: none !important;
}

#pldcCalculator {
    padding: 18px;
}

#pldcCalculator .tool-layout-split {
    grid-template-columns: 350px minmax(0, 1fr);
    gap: 16px;
}

#pldcCalculator .tool-layout-input {
    gap: 8px;
}

#pldcCalculator .tool-layout-result {
    top: 84px;
    gap: 10px;
}

.pldc-intro {
    display: grid;
    gap: 6px;
}

.pldc-lead {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    color: #5f5a56;
}

#pldcResultCol {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
}

.pldc-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: #fff;
    border: 1px solid #e8e4dc;
    border-radius: 10px;
    padding: 12px 14px;
    box-shadow: 0 1px 4px rgba(45, 42, 38, 0.05);
    transition: box-shadow 0.2s ease;
}

.pldc-section:hover {
    box-shadow: 0 2px 8px rgba(45, 42, 38, 0.08);
}

.pldc-input-section {
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

.pldc-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 700;
    color: #2d2a26;
}

.pldc-section-title i,
.pldc-assumption-title i {
    color: #d4af37;
}

.pldc-input-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.pldc-input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-width: 100%;
    box-sizing: border-box;
}

.pldc-input-label {
    font-size: 12px;
    font-weight: 600;
    color: #5f5a56;
}

.pldc-inline-input {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
}

.pldc-money-input,
.pldc-number-input,
.pldc-text-input {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding: 9px 11px;
    font-size: 14px;
    color: #2d2a26;
    background: #fff;
    border: 1px solid #e8e4dc;
    border-radius: 8px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.pldc-money-input {
    text-align: right;
    font-weight: 600;
}

.pldc-number-input {
    text-align: center;
    font-weight: 600;
}

.pldc-text-input {
    font-weight: 600;
}

.pldc-money-input:hover,
.pldc-number-input:hover,
.pldc-text-input:hover {
    border-color: #d4c67a;
}

.pldc-money-input:focus,
.pldc-number-input:focus,
.pldc-text-input:focus {
    outline: none;
    border-color: #d4af37;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.12);
}

.pldc-money-input::placeholder,
.pldc-number-input::placeholder,
.pldc-text-input::placeholder {
    color: #c4c0bc;
}

.pldc-unit-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 6px 10px;
    border: 1px solid #e8e4dc;
    border-radius: 8px;
    background: #faf9f7;
    color: #5f5a56;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.pldc-money-note {
    font-size: 11px;
    line-height: 1.4;
    color: #b58300;
}

.pldc-quick-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pldc-quick-btn {
    padding: 6px 10px;
    border: 1px solid #e8e4dc;
    border-radius: 999px;
    background: #fff;
    color: #5f5a56;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pldc-quick-btn:hover,
.pldc-quick-btn:focus-visible {
    border-color: #d4af37;
    background: rgba(212, 175, 55, 0.12);
    color: #8a6500;
    outline: none;
}

.pldc-assumption-box {
    display: grid;
    gap: 6px;
    padding: 8px 10px;
    border-radius: 9px;
    border: 1px solid #eadfb8;
    background: #fffaf0;
}

.pldc-assumption-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 700;
    color: #7a5d18;
}

.pldc-assumption-list,
.pldc-tip-list,
.pldc-note-list {
    margin: 0;
    padding-left: 18px;
    display: grid;
    gap: 6px;
    color: #5f5a56;
    font-size: 12px;
    line-height: 1.5;
}

.pldc-assumption-list {
    gap: 4px;
    padding-left: 16px;
    font-size: 11px;
    line-height: 1.4;
}

.pldc-note-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px 16px;
}

.pldc-btn-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.pldc-btn-group .tool-btn {
    min-height: 40px;
    padding: 10px 12px;
    font-size: 13px;
}

.pldc-waiting {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid #f0d2c5;
    background: #fff4ee;
    color: #8b4d32;
}

.pldc-waiting i {
    font-size: 16px;
    line-height: 1.2;
}

.pldc-waiting p {
    margin: 0;
    font-size: 12px;
    line-height: 1.5;
}

.pldc-result-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 8px 14px;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid #eadfb8;
    background: linear-gradient(180deg, #fffdf7 0%, #fff9ec 100%);
    color: #2d2a26;
    box-shadow: 0 1px 4px rgba(45, 42, 38, 0.05);
}

.pldc-hero-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    grid-column: 1 / -1;
}

.pldc-status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    padding: 4px 10px;
    border-radius: 999px;
    background: #f5e7b0;
    color: #7a5d18;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.pldc-status-badge.is-neutral {
    background: #f3ede0;
    color: #7a756d;
}

.pldc-copy-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 1px solid #e2d6bd;
    border-radius: 10px;
    background: #fff;
    color: #7a5d18;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.pldc-copy-btn:hover,
.pldc-copy-btn:focus-visible {
    background: #faf4e3;
    transform: translateY(-1px);
    outline: none;
}

.pldc-copy-btn.is-copied {
    background: rgba(91, 171, 121, 0.14);
    border-color: rgba(91, 171, 121, 0.4);
}

.pldc-hero-expression {
    font-size: 12px;
    font-weight: 600;
    color: #8a6500;
}

.pldc-hero-value {
    font-size: clamp(22px, 3vw, 28px);
    line-height: 1.15;
    font-weight: 800;
    letter-spacing: -0.02em;
    text-align: right;
    color: #2d2a26;
}

.pldc-hero-label {
    grid-column: 1 / -1;
    font-size: 11px;
    color: #8a857d;
}

.pldc-hero-summary {
    grid-column: 1 / -1;
    margin: 0;
    font-size: 12px;
    line-height: 1.5;
    color: #5f5a56;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pldc-formula-box {
    grid-column: 1 / -1;
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px dashed #eadfb8;
    background: #fff;
    font-size: 11px;
    line-height: 1.45;
    color: #7a756d;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pldc-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.pldc-kpi-card {
    display: grid;
    gap: 4px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid #e8e4dc;
    background: #fff;
    box-shadow: 0 1px 3px rgba(45, 42, 38, 0.04);
}

.pldc-kpi-label {
    font-size: 11px;
    color: #7a756d;
}

.pldc-kpi-value {
    font-size: 16px;
    line-height: 1.2;
    font-weight: 800;
    color: #2d2a26;
}

.pldc-offer-section,
.pldc-chart-section,
.pldc-table-section,
.pldc-note-section,
.pldc-tip-section {
    position: relative;
}

.pldc-offer-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.pldc-offer-card {
    display: grid;
    gap: 8px;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid #e8e4dc;
    background: #faf9f7;
}

.pldc-offer-card.is-best {
    border-color: #d4af37;
    background: linear-gradient(180deg, rgba(255, 248, 229, 0.96) 0%, rgba(255, 251, 240, 0.96) 100%);
}

.pldc-offer-card.is-placeholder {
    background: #fff;
}

.pldc-offer-card-head {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.pldc-rank-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 50px;
    min-height: 30px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(212, 175, 55, 0.16);
    color: #8a6500;
    font-size: 12px;
    font-weight: 700;
}

.pldc-offer-name {
    font-size: 14px;
    font-weight: 800;
    color: #2d2a26;
}

.pldc-offer-meta {
    font-size: 11px;
    line-height: 1.4;
    color: #7a756d;
}

.pldc-offer-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
}

.pldc-offer-metric {
    display: grid;
    gap: 4px;
    padding: 8px 9px;
    border-radius: 10px;
    background: #fff;
    border: 1px solid #efeae2;
}

.pldc-offer-metric-label {
    font-size: 10px;
    color: #7a756d;
}

.pldc-offer-metric-value {
    font-size: 13px;
    line-height: 1.3;
    font-weight: 700;
    color: #2d2a26;
}

.pldc-chart-summary,
.pldc-table-summary {
    margin: 0;
    font-size: 12px;
    line-height: 1.5;
    color: #5f5a56;
}

.pldc-chart-wrap {
    position: relative;
    width: 100%;
    height: 220px;
    min-height: 220px;
    border-radius: 12px;
    background: #faf9f7;
    border: 1px solid #efeae2;
    padding: 8px;
    box-sizing: border-box;
}

.pldc-chart-wrap canvas {
    width: 100% !important;
    height: 100% !important;
    max-height: 100%;
}

.pldc-chart-fallback-wrap {
    overflow-x: auto;
}

.pldc-fallback-table,
.pldc-compare-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 720px;
    table-layout: fixed;
}

.pldc-fallback-table th,
.pldc-fallback-table td,
.pldc-compare-table th,
.pldc-compare-table td {
    padding: 8px 8px;
    border-bottom: 1px solid #efeae2;
    text-align: left;
    font-size: 12px;
    line-height: 1.45;
    color: #5f5a56;
    vertical-align: top;
    white-space: normal;
    word-break: keep-all;
    overflow-wrap: anywhere;
}

.pldc-fallback-table th,
.pldc-compare-table th {
    font-size: 11px;
    font-weight: 700;
    color: #7a756d;
    background: #faf9f7;
}

.pldc-table-wrap {
    overflow-x: auto;
    border: 1px solid #efeae2;
    border-radius: 12px;
}

.pldc-compare-table td strong,
.pldc-fallback-table td strong {
    color: #2d2a26;
}

.pldc-table-row {
    transition: background 0.2s ease;
}

.pldc-table-row.is-best {
    background: rgba(212, 175, 55, 0.08);
}

.pldc-table-offer {
    display: grid;
    gap: 4px;
}

.pldc-table-offer-name {
    font-size: 13px;
    font-weight: 700;
    color: #2d2a26;
}

.pldc-table-offer-meta {
    font-size: 11px;
    color: #7a756d;
    white-space: normal;
    word-break: keep-all;
    overflow-wrap: anywhere;
}

.pldc-table-number {
    font-size: 13px;
    font-weight: 700;
    color: #2d2a26;
    white-space: normal;
    word-break: keep-all;
    overflow-wrap: anywhere;
}

.pldc-table-sub {
    display: block;
    margin-top: 2px;
    font-size: 11px;
    color: #8a857d;
    white-space: normal;
    word-break: keep-all;
    overflow-wrap: anywhere;
}

@media (max-width: 1320px) {
    .pldc-offer-cards,
    .pldc-note-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 1024px) {
    #pldcCalculator .tool-layout-split {
        grid-template-columns: 1fr;
    }

    .pldc-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .pldc-offer-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .pldc-input-row,
    .pldc-kpi-grid,
    .pldc-offer-metrics,
    .pldc-offer-cards,
    .pldc-note-list {
        grid-template-columns: 1fr;
    }

    .pldc-result-hero {
        grid-template-columns: 1fr;
        padding: 14px;
    }

    .pldc-chart-wrap {
        height: 210px;
        min-height: 210px;
    }

    .pldc-hero-value {
        text-align: left;
    }
}

@media (max-width: 640px) {
    .pldc-btn-group {
        flex-direction: column;
    }

    .pldc-btn-group .tool-btn {
        width: 100%;
        justify-content: center;
    }

    .pldc-copy-btn {
        align-self: flex-start;
    }

    .pldc-section,
    .pldc-kpi-card,
    .pldc-offer-card {
        padding: 12px;
    }
}
