/*  Main Layout  */
.calculator-wrapper {
    display: flex;
    gap: 20px;
    font-family: Arial, sans-serif;
    max-width: 1100px;
}

.calculator-left {
    width: 200px;
}

.calculator-left button {
    width: 100%;
    background: none;
    border: none;
    padding: 8px 0;
    text-align: left;
    font-size: 15px;
    cursor: pointer;
    color: #333;
}

.calculator-left button.selected {
    color: #F2B01D;
    font-weight: bold;
}

.calculator-right {
    flex: 1;
    border-left: 1px solid #ddd;
    padding-left: 15px;
    min-width: 0; 
}

.calculator-box {
    display: none;
}

.calculator-box.active {
    display: block;
}

/*  Grout & Adhesive Layout  */
.grout-layout {
    display: flex;
    gap: 25px; 
    margin-top: 12px;
}

.grout-form {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px 10px;
    align-items: start;
    flex: 1;
    min-width: 0;
}

.grout-grid label,
.grout-form label {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 0;
    font-size: 14px;
}

.input-unit-wrapper {
    position: relative;
    width: 100%;
}

.input-unit-wrapper input {
    width: 100%; 
    padding: 5px 25px 5px 5px; 
    box-sizing: border-box;
    font-size: 14px;
}

.input-unit-wrapper .unit {
    position: absolute;
    right: 5px; 
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    color: #555;
    white-space: nowrap; 
}


.grout-grid label.joint-width,
.grout-grid label.total-area,
.grout-form label.adh-total-area {
    grid-column: 1 / 2;
}

.calc-btn {
    grid-column: 1 / -1;
    background: #F2B01D;
    color: white;
    border: none;
    padding: 6px 14px;
    border-radius: 6px;
    cursor: pointer;
    margin-top: 6px;
    width: fit-content;
}

.calc-btn:hover {
    background: #d99f1a;
}

/* Result Card */
.grout-result-card {
    flex: 0 0 320px; 
    min-width: 320px;
    background: #f3f3f3;
    padding: 18px;
    border-radius: 12px;
}

.grout-result-card .title {
    font-size: 15px;
    margin-bottom: 6px;
}

.grout-result-card .value {
    font-size: 28px;
    font-weight: bold;
}

.grout-result-card .unit {
    font-size: 14px;
}

.grout-result-card .note {
    font-size: 11px;
    margin-top: 8px;
    color: #666;
}

/*  Tile Adhesive Note  */
.adh-note {
    font-size: 14px;
    color: #333;
    margin-bottom: 4px;
}

/*  Tile Adhesive Radios  */
.adh-thk-wrapper-full {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 6px;
}

.radio-row {
    display: flex;
    gap: 12px;
}

.radio-row label {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    white-space: nowrap;
}

.btn-row {
    grid-column: 1 / -1;
    display: flex;
    gap: 10px;
    margin-top: 6px;
}

.reset-btn {
    background: #F2B01D;
}

.reset-btn:hover {
    background: #d99f1a;
}

.packaging {
    margin-top: 12px;
    color: #444444;
}

.packaging-title {
    font-size: 13px;
    opacity: 0.8;      
    margin-bottom: 6px;
}

.packaging-row {
    display: flex;           
    justify-content: flex-start; 
    align-items: center;
    gap: 6px;              
    margin: 4px 0;        
    flex-wrap: nowrap;     
}

.kg {
    font-weight: 700;  
}

.unit-text {
    opacity: 0.75; 
}

.unit-number {
    font-weight: 700;
    font-size: 20px;  
    margin-left: 6px;
}

/*  Responsive  */
@media (max-width: 768px) {
    .calculator-wrapper {
        flex-direction: column;
    }

    .calculator-left {
        width: 100%;
        display: flex;
        gap: 8px;
    }

    .calculator-left button {
        text-align: center;
        flex: 1;
        font-size: 14px;
    }

    .calculator-right {
        border-left: none;
        padding-left: 0;
        margin-top: 15px;
    }

    .grout-layout {
        flex-direction: column;
    }

    .grout-grid,
    .grout-form {
        grid-template-columns: 1fr;
    }

    .grout-grid label.joint-width,
    .grout-grid label.total-area,
    .grout-form label.adh-total-area,
    .calc-btn {
        grid-column: auto;
    }
}

/* ===== Calculator Hero ===== */
.calculator-hero {
    position: relative;
    width: 100vw;
    height: 280px;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    overflow: hidden;
    margin-bottom: 30px;
}


.calculator-hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.calculator-hero-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.35);
}

.calculator-hero-overlay h1 {
    color: #ffffff;
    font-size: 48px;
    font-weight: 600;
    margin: 0;
}

input.input-error {
    border: 1px solid #d32f2f !important;
}

.form-error {
    grid-column: 1 / -1;     
    background: #fff4f4;
    color: #b91c1c;
    border: 1px solid #fca5a5;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    display: none;
}
