/* ===== DRYWALL CALCULATOR ===== */

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: #ffffff;
    color: #222;
    line-height: 1.5;
}

.tool-container {
    max-width: 760px;
    padding: 20px;
}

.tool-header h1 {
    margin: 0 0 6px;
    font-size: 30px;
}

.tool-header p {
    margin: 0;
    color: #555;
}

.calculator-section,
.results-section,
.info-section {
    border-top: 2px solid #333;
    margin-top: 26px;
    padding-top: 18px;
}

h2 {
    margin: 0 0 16px;
    font-size: 20px;
}

.subheading {
    margin-top: 24px;
}

.input-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.second-row {
    margin-top: 14px;
}

.price-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.field label {
    font-weight: 600;
}

input,
select {
    width: 100%;
    padding: 10px;
    border: 1px solid #aaa;
    border-radius: 4px;
    background: #fff;
    color: #222;
    font-size: 16px;
}

input:focus,
select:focus {
    outline: 2px solid #555;
    outline-offset: 1px;
}

.field-note {
    margin: 10px 0 0;
    color: #666;
    font-size: 14px;
}

#calculateButton {
    margin-top: 20px;
    padding: 11px 18px;
    border: 0;
    border-radius: 4px;
    background: #222;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
}

#calculateButton:hover {
    background: #444;
}

.error-message {
    min-height: 24px;
    margin-top: 10px;
    color: #a00000;
    font-weight: 600;
}

.results {
    border: 1px solid #ccc;
    border-radius: 4px;
}

.result-row {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 12px 14px;
    border-bottom: 1px solid #ddd;
}

.result-row:last-child {
    border-bottom: 0;
}

.result-row strong {
    text-align: right;
}

.result-note {
    margin-bottom: 0;
    color: #666;
    font-size: 14px;
}

.info-section p {
    color: #444;
}

.info-section h2:not(:first-child) {
    margin-top: 26px;
}

.formula {
    margin: 16px 0;
    padding: 12px;
    border-left: 4px solid #333;
    background: #f3f3f3;
    font-weight: 700;
}

@media (max-width: 650px) {

    .tool-container {
        padding: 14px;
    }

    .tool-header h1 {
        font-size: 26px;
    }

    .input-grid,
    .price-grid {
        grid-template-columns: 1fr;
    }

    .result-row {
        flex-direction: column;
        gap: 3px;
    }

    .result-row strong {
        text-align: left;
    }
}