/* ===== ROCKUTILITY UNIT CONVERTER ===== */

* {
    box-sizing: border-box;
}

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

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


/* ===== MAIN TOOL ===== */

.unit-converter {
    max-width: 760px;
    margin: 0;
    padding: 20px;
}

h1 {
    margin-top: 0;
    margin-bottom: 6px;
    font-size: 30px;
}

.tool-description {
    margin-top: 0;
    margin-bottom: 24px;
    color: #555;
}


/* ===== SECTIONS ===== */

.calculator-section,
.results-section,
.useful-info,
.disclaimer {
    border-top: 2px solid #333;
    padding-top: 16px;
    margin-top: 24px;
}

.calculator-section h2,
.results-section h2,
.useful-info h2,
.disclaimer h2 {
    margin-top: 0;
    margin-bottom: 14px;
    font-size: 20px;
}


/* ===== INPUTS ===== */

.input-row {
    display: grid;
    grid-template-columns: 220px 1fr;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
}

.input-row label {
    font-weight: bold;
}

.input-wrapper {
    display: flex;
    align-items: center;
    border: 1px solid #999;
    background: #fff;
    max-width: 300px;
}

.input-wrapper input {
    width: 100%;
    border: 0;
    padding: 9px;
    font-size: 16px;
    outline: none;
}

select {
    width: 300px;
    max-width: 100%;
    padding: 9px;
    font-size: 16px;
    border: 1px solid #999;
    background: #fff;
}


/* ===== CONVERT BUTTON ===== */

#convertBtn {
    margin-top: 24px;
    padding: 11px 20px;
    font-size: 17px;
    font-weight: bold;
    background: #e6e6e6;
    color: #111;
    border: 1px solid #777;
    cursor: pointer;
}

#convertBtn:hover {
    background: #d7d7d7;
}


/* ===== RESULTS ===== */

.result-row {
    max-width: 600px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 25px;
    padding: 10px 0;
    border-bottom: 1px solid #ddd;
}

.total-row {
    margin-top: 5px;
    padding-top: 14px;
    padding-bottom: 14px;
    border-top: 2px solid #333;
    border-bottom: 2px solid #333;
    font-size: 18px;
}

#result {
    text-align: right;
    overflow-wrap: anywhere;
}


/* ===== USEFUL INFORMATION ===== */

.useful-info {
    max-width: 650px;
}

.useful-info p {
    margin: 0 0 12px 0;
}


/* ===== DISCLAIMER ===== */

.disclaimer {
    max-width: 650px;
    font-size: 13px;
    color: #555;
    padding-bottom: 20px;
}

.disclaimer p {
    margin-bottom: 0;
}


/* ===== MOBILE ===== */

@media (max-width: 650px) {

    .unit-converter {
        padding: 14px;
    }

    .input-row {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .input-wrapper,
    select {
        width: 100%;
        max-width: none;
    }

    .result-row {
        display: block;
    }

    #result {
        display: block;
        text-align: left;
        margin-top: 8px;
    }

    h1 {
        font-size: 26px;
    }
}