:root {
    --theme-color: #72A542;
}
body {
    font-family: 'Barlow', sans-serif;
    background-color: #F3F0F0;
    line-height: 1.6;
    color: #333;
    margin: 0;
    padding: 20px;
}
#mainContainer {
    max-width: 550px;
    margin: 0 auto;
    padding: 25px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.activity-nav-group {
    margin-bottom: 15px;
}
.activity-nav-group strong {
    display: block;
    margin-bottom: 8px;
    text-transform: uppercase;
    font-size: 0.9em;
    color: #555;
}
.activity-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.activity-buttons button {
    font-family: 'Barlow', sans-serif;
    border-radius: 25px;
    border: 1px solid #ccc;
    padding: 8px 12px;
    cursor: pointer;
    background: #E0E0E0;
    font-weight: 600;
    transition: background-color 0.2s, color 0.2s;
}
.activity-buttons button.selected {
    background-color: var(--theme-color); /* Uses your theme color */
    color: #fff;
    border-color: var(--theme-color); /* Matches the border to the theme color */
}
/* Add a hover effect for unselected buttons */
.activity-buttons button:not(.selected):hover {
    background-color: #d0d0d0; /* A slightly darker grey */
    border-color: #b0b0b0;
}
.activity-description-style {
    padding: 15px;
    margin: 0 0 20px 0;
    background-color: #eaf2f8;
    border-left: 5px solid var(--theme-color);
    color: #333;
    font-style: italic;
}
.appliance-item {
    display: grid;
    grid-template-columns: 50px 1fr auto;
    gap: 8px 10px;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eeeeee;
}
.appliance-icon {
    grid-row: 1 / span 2;
}
.appliance-icon svg {
    width: 50px;
    height: 50px;
}
.appliance-title {
    font-weight: 700;
    font-size: 1.1em;
    color: var(--theme-color);
}
.appliance-desc {
    font-size: 0.9em;
    grid-column: 2;
    color: #555;
}
.appliance-controls {
    grid-column: 2;
    display: flex;
    align-items: center;
    gap: 10px;
}
.appliance-controls input[type="range"] {
    flex-grow: 1;
    accent-color: var(--theme-color);
}
.appliance-kwh {
    font-weight: 700;
    font-size: 1.1em;
    text-align: right;
}
.summary-details-container, .battery-container, .email-form-container, .custom-appliance-section {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 2px solid #ddd;
}
.summary-item {
    display: flex;
    justify-content: space-between;
    font-family: monospace;
    padding: 2px 0;
}
.summary-total-item {
    display: flex;
    justify-content: space-between;
    font-weight: 700;
    font-size: 1.2em;
    border-top: 1px solid #999;
    margin-top: 10px;
    padding-top: 10px;
}
.battery-recommendations {
    display: flex;
    justify-content: space-around;
    align-items: flex-end;
    gap: 15px;
    min-height: 250px;
    padding: 10px;
    align-items: start;
}
.battery-item {
    text-align: center;
    flex-basis: 30%;
}
.battery-item img {
    max-width: 100%;
    height: auto;
    margin-bottom: 10px;
}
.battery-item .name {
    font-weight: 600;
}
.battery-item .capacity {
    font-size: 0.9em;
}
form label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
}
form input[type="text"], form input[type="email"], form input[type="number"], form input[type="tel"] {
    width: 100%;
    box-sizing: border-box;
    padding: 8px;
    margin-bottom: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
}
form button {
    width: 100%;
    padding: 10px;
    background: var(--theme-color);
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 1em;
    font-weight: 700;
    cursor: pointer;
}
#custom-appliance-inputs {
    padding: 15px;
    margin-top: 10px;
    border: 1px solid #eee;
    background: #fafafa;
    border-radius: 5px;
}
#custom-appliance-inputs div {
    /* Adds a bit of space between each line */
    margin-top: 8px;
}

#custom-appliance-inputs label {
    /* This is the key part. It allows a width to be set on the label. */
    display: inline-block;

    /* Set a fixed width for all labels.
       Adjust this value to fit your longest label. */
    width: 150px;
}
/* --- Custom Slider Styles --- */

/* This is the main slider rule that creates the fill effect */
.appliance-controls input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    background: #ddd; /* The color of the track that is NOT filled */
    border-radius: 3px;
    outline: none;
    /* The magic: A gradient that will be resized by JavaScript */
    background-image: linear-gradient(var(--theme-color), var(--theme-color));
    background-size: 0% 100%; /* Start with 0% fill */
    background-repeat: no-repeat;
}

/* Make the default browser track transparent */
.appliance-controls input[type="range"]::-webkit-slider-runnable-track {
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    height: 6px;
}
.appliance-controls input[type="range"]::-moz-range-track {
    -moz-appearance: none;
    appearance: none;
    background: transparent;
    height: 6px;
}

/* Style the thumb (the "blob") */
.appliance-controls input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    margin-top: -7px;
    background-color: var(--theme-color);
    height: 20px;
    width: 20px;
    border-radius: 50%;
    cursor: pointer;
}
.appliance-controls input[type="range"]::-moz-range-thumb {
    border: none;
    background-color: var(--theme-color);
    height: 20px;
    width: 20px;
    border-radius: 50%;
    cursor: pointer;
}

#op_cnf_popup {
    display: none;
}


#op_cnf_popup.op_cnf_popup_show {
    display: block;
    position: fixed;
    top: 0;
    bottom: 0;
    z-index: 10000;
    left: 0;
    right: 0;
    background: #0000006e;
}
#op_cnf_popup.op_cnf_popup_show #mainContainer {
    position: fixed;
    top: 100px;
    left: 0;
    right: 0;
    height: 70vh;
    overflow-y: auto;
}