/* Reset some default browser styles */
body,
h1,
h2,
p,
div,
form,
select,
input,
label {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

p {
    margin-bottom: 1rem;
    /* space between paragraphs */
    line-height: 1.5;
    /* makes text more readable */
}

p:last-child {
    margin-bottom: 0;
}

.total_cost {
    font-weight: bold;
    font-size: 1.3rem;
    text-align: center;

    /* golden gradient */
    background: linear-gradient(45deg,
            #ffd700,
            #ffcc00,
            #f9ec8b,
            #ffd700);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;

    /* shimmer animation */
    background-size: 300% 300%;
    animation: shimmer 3s linear infinite;
}

@keyframes shimmer {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.top img {
    max-height: 4rem;
}

.container {
    max-width: 500px;
    /* same width as form/results */
    width: 100%;
    margin: 0 auto;
    /* centers the container */
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    /* spacing between sections */

    padding-bottom: 100px;
}

/* optional: make .top text+image align nicely */
/* .top {
    display: flex;
    align-items: center;
    justify-content: space-between;
} */

/* Page background and centering */
body {
    background: #f8f9fa;
    color: #333;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
}

/* Heading */
h1 {
    margin-bottom: 1rem;
    text-align: center;
    color: #222;
}

/* Form container */
form {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    max-width: 500px;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Labels and inputs */
label {
    font-weight: bold;
    margin-right: 0.5rem;
}

input,
select {
    padding: 0.4rem 0.6rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 1rem;
    width: auto;
}

/* Form rows */
.row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

/* Lines between scroll rows */
#rows-container .row {
    padding: 0.75rem 0;
    border-bottom: 1px solid #96979a;
    /* light gray */
}

#rows-container .row:last-child {
    border-bottom: 0;
    /* no line after the last row */
}

/* Submit button */
input[type="submit"],
button,
.btn {
    background: #007bff;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 0.6rem 1.2rem;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.2s ease;
}

input[type="submit"]:hover,
button:hover {
    background: #0056b3;
}

/* Results box */
#results {
    margin-top: 1.5rem;
    background: white;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    max-width: 500px;
    width: 100%;
}

/* Hide upon first load */
#results:empty {
    display: none;
}

.checkbox-inline {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.3rem;
    white-space: nowrap;
    /* keeps "White Scroll" on one line */
}

/* Mobile responsiveness */
@media (max-width: 600px) {

    form,
    #results {
        padding: 1rem;
    }

    .row {
        flex-direction: column;
        align-items: flex-start;
    }

    /* Force checkbox+label to stay side-by-side */
    .checkbox-inline {
        flex-direction: row !important;
    }

    input,
    select {
        width: 100%;
    }
}