/* General & Typography */
body {
    font-family: 'Space Grotesk', sans-serif;
    background-color: #f8f8f8; /* Very light grey background */
    color: #1a1a1a; /* Dark grey text */
    margin: 0;
    padding: 30px;
    line-height: 1.6;
    min-width: 320px;
    display: flex;
    justify-content: center;
}

.container {
    width: 100%;
    max-width: 800px;
    /* No border on container itself */
}

header {
    text-align: center;
    margin-bottom: 40px;
}

h1, h2, h3, h4 {
    font-weight: 700;
    color: #000;
}

h1 {
    font-size: 2.2em;
    margin-bottom: 10px;
    letter-spacing: -0.02em; /* Slight tightening */
}

h2 {
     font-size: 1.4em;
     margin-top: 0;
     margin-bottom: 20px;
     padding-bottom: 5px;
     border-bottom: 1px solid #ccc; /* Lighter separator */
     text-align: left;
     letter-spacing: -0.01em;
}

h3 {
    font-size: 1.1em;
    margin-top: 15px;
    margin-bottom: 10px;
    color: #333; /* Slightly lighter black for sub-headings */
}

/* Card Structure */
.card {
    background-color: #fff;
    border: 1px solid #eee; /* Very light border */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05); /* Subtle shadow */
    margin-bottom: 30px;
    padding: 25px;
}

.card header h2 {
    border-bottom: none; /* Remove border from card header */
    margin-bottom: 0;
    padding-bottom: 0;
}

.card-section {
    padding: 20px 0; /* Padding within sections */
    border-bottom: 1px dashed #eee; /* Lighter dashed separator */
}

.card-section:last-child {
    border-bottom: none; /* No border after the last section */
    padding-bottom: 0;
}

/* Form Elements */
.radio-group,
.checkbox-group {
    margin-top: 15px;
    display: flex; /* Use flexbox for inline groups */
    flex-wrap: wrap; /* Allow wrapping */
    gap: 15px; /* Space between items */
}

.radio-group > div, /* For wrapping individual radio/checkbox groups if needed */
.checkbox-group > div {
     display: flex;
     align-items: center;
}


.radio-group label,
.checkbox-group label {
    cursor: pointer;
    display: inline-flex; /* Align content */
    align-items: center; /* Vertically align icon/text */
    margin-right: 0; /* Reset margin */
    margin-bottom: 0; /* Reset margin */
}

input[type="radio"],
input[type="checkbox"] {
    margin-right: 8px; /* More space */
    vertical-align: middle;
    cursor: pointer;
    /* Custom radio/checkbox styling (advanced CSS needed for full custom look) */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border: 1px solid #000;
    border-radius: 3px; /* Square for checkbox, more round for radio below */
    position: relative;
    flex-shrink: 0; /* Prevent shrinking */
}

input[type="radio"] {
     border-radius: 50%; /* Round for radio */
}

input[type="radio"]:checked::before {
    content: '';
    width: 8px;
    height: 8px;
    background-color: #000;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

input[type="checkbox"]:checked::before {
    content: '\2713'; /* Checkmark symbol */
    display: block;
    width: 100%;
    height: 100%;
    line-height: 16px;
    text-align: center;
    font-size: 12px;
    color: #000;
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
    color: #333;
}

select,
input[type="number"] {
    font-family: 'Space Grotesk', sans-serif;
    padding: 10px 12px; /* More padding */
    border: 1px solid #ccc; /* Lighter border */
    color: #1a1a1a;
    background-color: #fff;
    width: 100%;
    box-sizing: border-box;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23000%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13.5-6.4H18.9c-5%200-9.3%201.8-12.9%205.4L0%2082.6l146.4%20146.8%20146.4-146.8z%22%2F%3E%3C%2Fsvg%3E');
    background-repeat: no-repeat;
    background-position: right 12px top 50%;
    background-size: 10px auto; /* Smaller arrow */
    border-radius: 4px; /* Rounded corners */
}

select:focus,
input[type="number"]:focus,
input[type="radio"]:focus,
input[type="checkbox"]:focus {
    outline: none;
    border-color: #000; /* Focus border */
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1); /* Subtle focus glow */
}

/* Specific styles for property rows in package deal */
.property-input-group {
    border: 1px solid #eee; /* Lighter border */
    background-color: #fcfcfc; /* Very light background */
    margin-bottom: 15px;
    padding: 15px; /* Padding inside group */
    border-radius: 4px;
}

.property-input-group h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1em;
    border-bottom: 1px dashed #ddd; /* Lighter dashed line below property title */
    padding-bottom: 8px;
}


.property-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); /* Responsive grid */
    gap: 20px;
    align-items: flex-end; /* Align bottoms */
}

.property-row .input-group {
    margin-bottom: 0;
}

.property-row .size-input input[type="number"] {
    min-width: 80px; /* Allow smaller width for size input */
}


/* Results Output */
#results-output h2 {
    margin-bottom: 20px;
}

#results-output dl {
    display: grid;
    grid-template-columns: max-content 1fr auto; /* Label, Space, Value */
    gap: 10px 20px;
    align-items: baseline; /* Align text baselines */
}

#results-output dt {
    font-weight: 700;
    text-align: left;
    grid-column: 1 / 2; /* Always in the first column */
}

#results-output dd {
    text-align: right;
    margin: 0;
    grid-column: 3 / 4; /* Always in the third column */
}

/* Styling for dynamically added add-on items */
#results-output dt.addon-item,
#results-output dd.addon-item {
    font-weight: 400; /* Lighter weight */
    font-size: 0.95em;
    color: #333;
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

#results-output dt.addon-item {
     grid-column: 2 / 3; /* Place add-on labels in the middle column */
     text-align: left;
}
 #results-output dd.addon-item {
     grid-column: 3 / 4; /* Place add-on values in the third column */
     text-align: right;
 }

/* Special formatting for discount values */
#results-output dd.discount {
    color: #0a0; /* Green-ish for discount, keeping monochrome theme implies dark grey or bold */
    /* Let's stick to monochrome, maybe bold and italic? */
    font-weight: 700;
    font-style: italic;
    /* Or just bold with a specific text style */
}


#results-output dt.total-addon-cost-label,
#results-output dd#addon-cost-total {
     font-weight: 700;
     border-top: 1px dashed #ccc;
     padding-top: 8px;
     margin-top: 8px;
}
#results-output dt.total-addon-cost-label {
    grid-column: 1 / 3; /* Span two columns for the label */
    text-align: right;
}
#results-output dd#addon-cost-total {
    grid-column: 3 / 4;
}


#results-output dt.final-cost-label,
#results-output dd.final-cost {
    font-size: 1.3em;
    font-weight: 700;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 2px solid #000;
}
#results-output dt.final-cost-label {
     grid-column: 1 / 3; /* Span two columns */
     text-align: right;
}
#results-output dd.final-cost {
     grid-column: 3 / 4;
}

.disclaimer {
    font-size: 0.9em;
    color: #555;
    font-style: italic;
    margin-top: 20px;
    padding-top: 20px;
     border-top: 1px solid #eee;
}
.disclaimer strong {
    color: #333; /* Darker bold */
}


/* Services Breakdown */
#services-breakdown h2 {
    text-align: center;
}

#services-breakdown .intro {
    text-align: center;
    margin-bottom: 20px;
    font-style: italic;
}

.breakdown-item {
    margin-bottom: 25px;
}

.breakdown-item h3, .breakdown-item h4 {
    margin-bottom: 10px;
    text-align: left;
    border-bottom: none;
}

.breakdown-item ul {
    list-style: disc;
    margin-left: 20px;
    padding-left: 0;
}

.breakdown-item li {
    margin-bottom: 5px;
}

.breakdown-item .description {
    font-size: 0.9em;
    color: #555;
    margin-top: 3px;
    margin-bottom: 5px;
}

.breakdown-item .note {
    font-style: italic;
    font-size: 0.9em;
    margin-top: 10px;
    color: #555;
}

.breakdown-item table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    font-size: 0.95em;
}

.breakdown-item th, .breakdown-item td {
    border: 1px solid #ccc; /* Lighter table borders */
    padding: 10px 8px;
    text-align: left;
}

.breakdown-item th {
    background-color: #f0f0f0; /* Light grey header */
    font-weight: 700;
}

/* Utility classes */
.hidden {
    display: none !important;
}

.info-icon {
    display: inline-block;
    width: 15px; /* Slightly smaller */
    height: 15px;
    line-height: 15px;
    text-align: center;
    border: 1px solid #000;
    border-radius: 50%;
    font-size: 11px; /* Smaller font */
    font-weight: 700;
    cursor: help;
    margin-left: 5px;
    position: relative;
    top: -1px; /* Adjust vertical alignment */
     background-color: #fff;
     color: #000;
}

/* Simple Tooltip Styling */
.info-icon::after {
    content: attr(data-info);
    position: absolute;
    left: 50%;
    bottom: 120%;
    transform: translateX(-50%);
    background-color: #000;
    color: #fff;
    padding: 6px 10px; /* More padding */
    border-radius: 4px;
    white-space: nowrap;
    font-size: 12px;
    font-weight: 400;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.2s ease; /* Smooth transition */
    z-index: 10;
     min-width: 150px; /* Ensure minimum width */
     text-align: center; /* Center text */
}

.info-icon:hover::after {
    visibility: visible;
    opacity: 1;
}

.info-text {
    font-size: 0.9em;
    font-style: italic;
    color: #555;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px dashed #eee;
}

/* Responsive adjustments */
@media (max-width: 600px) {
    body {
        padding: 15px;
    }
    .card {
        padding: 15px;
    }
    .card-section {
        padding: 15px 0;
    }

    .property-row {
        grid-template-columns: 1fr; /* Stack columns */
        gap: 0;
    }
     .property-row .input-group {
         width: 100%;
         min-width: auto;
         margin-bottom: 15px; /* Add back margin when stacked */
     }
     .property-row .input-group:last-child {
          margin-bottom: 0;
     }

     #results-output dl {
         grid-template-columns: 1fr auto; /* Simpler stack with value right */
         gap: 8px 15px;
     }
      #results-output dt, #results-output dd {
          grid-column: auto / auto; /* Reset grid columns */
      }
     #results-output dt {
         text-align: left;
         font-weight: 700;
     }
      #results-output dd {
          text-align: right;
      }

     #results-output dt.addon-item {
         grid-column: 1 / 2; /* Addon item labels in first column */
         font-weight: 400;
         text-align: left;
     }

     #results-output dt.total-addon-cost-label {
         grid-column: 1 / 2; /* Total Addon label in first column */
         text-align: left;
     }
      #results-output dd#addon-cost-total {
         grid-column: 2 / 3; /* Total Addon value in second column */
     }

     #results-output dt.final-cost-label {
          grid-column: 1 / 2; /* Final label in first column */
          text-align: left;
     }
     #results-output dd.final-cost {
         grid-column: 2 / 3; /* Final value in second column */
     }


}