/* Construction Cost Calculator - Simple & Clean */
.tintoan {
    padding: 60px 0 60px;
    font-family: Arial, sans-serif;
    background: url(../images/bg_tintoan.png) no-repeat;
    background-size: 100% 100%;
}

/* Result Page Styles */
body.result-page {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #0E2A47 0%, #12355A 100%);
    color: white;
    margin: 0;
    padding: 20px;
    min-height: 100vh;
}

.result-container {
    max-width: 900px;
    margin: 0 auto;
    background: #12355A;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    border: 2px solid #F3C623;
}

.result-header {
    text-align: center;
    margin-bottom: 30px;
}

.result-logo {
    width: 80px;
    height: 80px;
    margin: 0 auto 15px;
    display: block;
}

.result-title {
    color: #F3C623;
    font-size: 28px;
    font-weight: bold;
    margin: 0 0 10px 0;
}

.result-subtitle {
    color: #B0C4DE;
    font-size: 16px;
    margin: 0;
}

.result-card {
    background: #0E2A47;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 25px;
    border: 1px solid #F3C623;
}

.result-card-title {
    color: #F3C623;
    font-size: 22px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 20px;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #2A4A6B;
}

.result-item:last-child {
    border-bottom: none;
}

.result-label {
    color: #B0C4DE;
    font-size: 16px;
    font-weight: 500;
}

.result-value {
    color: #F3C623;
    font-size: 18px;
    font-weight: bold;
}

.total-cost {
    background: linear-gradient(135deg, #F3C623 0%, #FFD700 100%);
    color: #0E2A47;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    margin: 20px 0;
}

.total-cost-label {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 10px;
}

.total-cost-value {
    font-size: 32px;
    font-weight: bold;
}

.details-section {
    margin-top: 25px;
}

.details-title {
    color: #F3C623;
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 15px;
    text-align: center;
}

/* Table styles */
.table-container {
    overflow-x: auto;
    margin: 20px 0;
}

.detailed-table {
    width: 100%;
    border-collapse: collapse;
    background: #0E2A47;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.detailed-table thead {
    background: #F3C623;
    color: #0E2A47;
}

.detailed-table th {
    padding: 15px 20px;
    text-align: left;
    font-weight: bold;
    font-size: 16px;
}

.detailed-table .txt_right {
    text-align: right;
}

.detailed-table td {
    padding: 12px 20px;
    border-bottom: 1px solid #2A4A6B;
    color: #B0C4DE;
}

.detailed-table tbody tr:hover {
    background: #1A3A5C;
}

.detailed-table .txt_red {
    color: #F3C623;
    font-weight: bold;
}

.detailed-table tfoot {
    background: #1A3A5C;
}

.detailed-table .total-row td {
    padding: 15px 20px;
    font-weight: bold;
    font-size: 16px;
    color: #F3C623;
    border-top: 2px solid #F3C623;
}

.detailed-table .w50 {
    width: 50%;
}

.formula-section {
    background: #1A3A5C;
    padding: 20px;
    border-radius: 10px;
    margin-top: 20px;
}

.formula-title {
    color: #F3C623;
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 15px;
    text-align: center;
}

.formula-text {
    color: #B0C4DE;
    font-size: 14px;
    line-height: 1.6;
    background: #0E2A47;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #F3C623;
}

.calculation-steps {
    margin-top: 15px;
    color: #87CEEB;
    font-size: 13px;
}

.calculation-steps strong {
    color: #F3C623;
}

/* Breakdown grid */
.breakdown-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.breakdown-item {
    background: #0E2A47;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #2A4A6B;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.breakdown-label {
    color: #B0C4DE;
    font-weight: 500;
}

.breakdown-value {
    color: #F3C623;
    font-weight: bold;
}

.back-button {
    background: #F3C623;
    color: #0E2A47;
    border: none;
    padding: 15px 30px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    margin-top: 20px;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.back-button:hover {
    background: #FFD700;
    transform: translateY(-2px);
    color: #0E2A47;
}

.breadcrumb {
    background: rgba(255,255,255,0.1);
    padding: 10px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.breadcrumb a {
    color: #F3C623;
    text-decoration: none;
}

.breadcrumb a:hover {
    color: #FFD700;
}

/* Icon spacing */
.result-title i,
.result-card-title i,
.details-title i,
.formula-title i,
.result-label i,
.total-cost-label i,
.back-button i {
    margin-right: 8px;
}

.box_dt_cp {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 30px;
    margin: 0 auto;
}

.title-zone {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid #0f3858;
}

.tiktok.padding-top-bottom {
    padding-bottom: 50px;
}

.title-zone h2 {
    color: #0f3858;
    font-size: 26px;
    margin: 0;
    font-weight: 600;
}

.text-center.xemboi a {
    background: #0f3858 !important;
    color: #fff;
    display: inline-block;
    padding: 7px 12px 7px 19px;
    font-family: 'Mulish-Regular';
    font-size: 15px;
    border-radius: 50px;
    transition: all .3s;
}

.text-center.xemboi a:hover {
    background: #0065b3 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(15, 56, 88, 0.3);
}

.text-center.xemboi a img {
    margin-left: 2px;
}

.text-center.xemboi a {
    margin-top: 10px !important;
    transition: all .3s !important;
}

input.tinhphixaydung {
    width: 23% !important;
    background: #0f3858 !important;
    transition: all .3s;
    border-radius: 50px !important;
}

input.tinhphixaydung {
    transition: all .3s !important;
}

.text-center.xemboi {
    margin-top: 20px;
}

.frm_lienhe {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(179px, 2fr));
    gap: 20px;
    margin-bottom: 20px;
}

.item_lienhe {
    margin-bottom: 15px;
}

.item_lienhe p {
    margin: 0 0 8px 0;
    font-size: 14px;
    color: #333;
    font-weight: 500;
}

.item_lienhe input,
.item_lienhe select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 15px;
    background: white;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
    height: 55.5px;
    font-family: 'Mulish-Regular';
}

.item_lienhe input:focus,
.item_lienhe select:focus {
    border-color: #0f3858;
    outline: none;
    box-shadow: 0 0 0 2px rgba(15, 56, 88, 0.1);
}

.itemrieng {
    grid-column: 1 / -1;
    text-align: center;
    margin-top: 20px;
}

.tinhphixaydung {
    background: #0f3858;
    color: white;
    border: none;
    padding: 15px 40px;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tinhphixaydung:hover {
    background: #1e5a8a !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(15, 56, 88, 0.3);
}

.tinhphixaydung:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Error Message */
.loicapcha.thongbao {
    margin-bottom: 15px;
}

.loicapcha.thongbao div {
    background: #f8d7da;
    color: #721c24;
    padding: 12px;
    border-radius: 4px;
    border: 1px solid #f5c6cb;
    font-size: 14px;
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
    margin-right: 8px;
}

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

/* Result Modal */
.calculation-result {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    max-width: 800px;
    width: 95%;
    max-height: 90vh;
    overflow-y: auto;
}

.calculation-result h3 {
    background: #0f3858;
    color: white;
    padding: 20px;
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    position: relative;
    border-radius: 8px 8px 0 0;
}

div#calculation-result {
    overflow-x: hidden;
}

.calculation-result button {
    position: absolute;
    top: 2px;
    right: -1px;
    background: none;
    border: none;
    font-size: 42px;
    color: #000000;
    cursor: pointer;
    padding: 0;
    width: 34px;
    height: 30px;
}

.calculation-result button:hover {
    opacity: 0.8;
}

/* Unit Price Display */
.unit-price-display {
    background: #ffe36d;
    color: #0f3858;
    padding: 10px;
    text-align: center;
    font-size: 21px;
    font-weight: bold;
    margin: 18px 0 6px;
    font-family: 'Montserrat-Bold';
    border-radius: 0;
}
tr.total-row strong {
    font-family: 'Mulish-Black';
}
/* Detailed Table */
.detailed-table {
    margin:15px 0;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.detailed-table table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.detailed-table th {
    background: #0f3858;
    color: white;
    padding: 15px;
    text-align: left;
    font-weight: 600;
}

.detailed-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
}

.detailed-table tbody tr:hover {
    background: #f8f9fa;
}

.detailed-table tfoot {
    background: #f8f9fa;
    font-weight: bold;
}

.detailed-table .total-row:last-child td {
    background: #0f3858;
    color: white;
    font-size: 16px;
}

.detailed-table td:nth-child(2) {
    text-align: center;
}

.detailed-table td:nth-child(3) {
    text-align: right;
}

.breakdown-section {
    margin: 20px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 4px;
}


.breakdown-section h5 {
    margin: 0 0 15px 0;
    color: #0f3858;
    font-size: 16px;
    font-weight: 600;
}

.breakdown-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}



.breakdown-label {
    color: #666;
    font-size: 14px;
}

.breakdown-value {
    color: #0f3858;
    font-size: 14px;
    font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
    input.tinhphixaydung {
        width: 100% !important;
        background: #0f3858 !important;
        transition: all .3s;
        border-radius: 50px !important;
    }

    .frm_lienhe {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .box_dt_cp {
        padding: 20px;
    }

    .calculation-result {
        width: 95%;
        margin: 10px;
    }

    .item_lienhe input,
    .item_lienhe select {
        height: 45.5px;
    }

    .item_lienhe input,
    .item_lienhe select {
        font-size: 14px;
    }

    .newsletter-input textarea {
        height: 100px !important;
    }

    .tintoan {
        padding: 30px 0 0 !important;
        font-family: Arial, sans-serif;
        background: url(../images/bg_tintoan.png) no-repeat;
        background-size: cover;
    }

    .detailed-table {
        margin: 10px;
    }

    .unit-price-display {
        margin: 10px;
    }

    .breakdown-section {
        margin: 10px;
    }
}

@media (max-width: 480px) {
    .tintoan {
        padding: 20px 0;
    }

    .box_dt_cp {
        padding: 15px;
    }

    .title-zone h2 {
        font-size: 20px;
    }

    .tinhphixaydung {
        padding: 12px 30px;
        font-size: 14px;
    }
}

th.txt_right {
    text-align: right;
}

tr.total-row {
    background: #fff0b0;
}
