:root {
    --lciqt-primary: #7ab55c;
    --lciqt-primary-dark: #6da152;
    --lciqt-text: #333333;
    --lciqt-bg: #ffffff;
    --lciqt-border: #e0e0e0;
    --lciqt-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --lciqt-radius: 12px;
    --lciqt-spacing: 20px;
}

.lawn-quote-container {
    max-width: 800px;
    /* Can be max-width 100% for mobile if embedded in a narrow column */
    margin: 20px auto;
    padding: var(--lciqt-spacing);
    border: 1px solid var(--lciqt-border);
    border-radius: var(--lciqt-radius);
    background: var(--lciqt-bg);
    box-shadow: var(--lciqt-shadow);
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    /* Modern stack */
    color: var(--lciqt-text);
    box-sizing: border-box;
}

/* Mobile adjustments */
@media (max-width: 600px) {
    .lawn-quote-container {
        padding: 15px;
        margin: 10px;
        border-radius: 8px;
    }
}

#lawn-map {
    height: 400px;
    width: 100%;
    margin-bottom: var(--lciqt-spacing);
    border: 1px solid #ddd;
    border-radius: 8px;
    /* Slightly softer corners */
    z-index: 1;
    /* Ensure it sits right */
}

/* Make Leaflet Zoom controls touch-friendly and centered */
.leaflet-touch .leaflet-control-zoom a {
    width: 44px;
    height: 44px;
    line-height: 44px;
    font-size: 22px;
}

/* 
   Leaflet Draw controls use sprites (30px x 30px). 
   Forcing them to 44px breaks the background-position alignment.
   Instead, we scale the entire Draw toolbar to make it larger 
   without breaking the internal sprite coordinate system.
*/
.leaflet-draw-toolbar {
    transform: scale(1.3);
    /* Make icons 30% larger */
    transform-origin: top left;
    margin-top: 10px;
    /* spacing after zoom control */
    margin-left: 5px;
    /* slight offset */
}

/* Ensure the scaled toolbar doesn't overlap/clip incorrectly */
.leaflet-draw-toolbar a {
    /* Reset generic touch sizes if necessary to let the sprite work */
    width: 30px !important;
    height: 30px !important;
    line-height: 30px !important;
}

#quote-output-container {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: var(--lciqt-spacing);
    border-left: 5px solid var(--lciqt-primary);
}

#quote-results p {
    margin: 8px 0;
    font-size: 1.1em;
    display: flex;
    justify-content: space-between;
    /* Better for mobile lists */
    align-items: center;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
}

#quote-results p:last-child {
    border-bottom: none;
}

#estimated-cost {
    font-weight: 800;
    color: var(--lciqt-primary);
    font-size: 1.4em;
}

/* Disclaimer Box */
.lciqt-disclaimer {
    background-color: #fff3cd;
    border: 1px solid #ffeeba;
    color: #856404;
    padding: 10px;
    margin-top: 10px;
    font-size: 0.85em;
    border-radius: 4px;
    line-height: 1.4;
}

#lciqt-submission-form input[type="text"],
#lciqt-submission-form input[type="email"],
.address-search-container input[type="text"] {
    width: 100%;
    padding: 12px;
    /* Larger hit area */
    margin: 8px 0;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-sizing: border-box;
    font-size: 16px;
    /* Prevents iOS zoom on focus */
}

.address-search-container {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
    /* Allow wrapping on very small screens */
}

.address-search-container input[type="text"] {
    flex-grow: 1;
    margin: 0;
}

#search-address-btn {
    background-color: #333;
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    /* Prevent button from squishing */
}

#search-address-btn:hover {
    background-color: #555;
    transform: translateY(-1px);
}

#submit-quote-btn {
    background-color: var(--lciqt-primary);
    color: white;
    padding: 16px 24px;
    /* Juicy button */
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.2em;
    font-weight: bold;
    width: 100%;
    transition: all 0.2s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-top: 10px;
    display: block;
}

#submit-quote-btn:hover:not(:disabled) {
    background-color: var(--lciqt-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

#submit-quote-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.form-message {
    margin-top: 15px;
    font-weight: 500;
    text-align: center;
}

#search-message {
    color: var(--lciqt-primary);
    font-size: 0.9em;
    margin-top: 5px;
    min-height: 1.2em;
    /* Prevent jump when text appears */
}

/* Headings inside the widget */
.lawn-quote-container h2 {
    margin-top: 0;
    font-size: 1.8em;
    color: var(--lciqt-text);
}

.lawn-quote-container h3 {
    margin-top: 25px;
    margin-bottom: 15px;
    font-size: 1.3em;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 8px;
}

/* Simple CSS Spinner */
.lciqt-spinner {
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: var(--lciqt-text);
    animation: lciqt-spin 1s ease-in-out infinite;
    margin-right: 5px;
    vertical-align: middle;
}

@keyframes lciqt-spin {
    to {
        transform: rotate(360deg);
    }
}