/* Mobile-First Lawn Care Estimator Styles */

/* Base container */
.lawncare-estimator-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Form styling */
#lawncare-form {
    background: #ffffff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

/* Form groups */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
    font-size: 16px;
}

/* Input fields */
#lawncare-form select,
#lawncare-form input[type="text"],
#lawncare-form input[type="email"],
#lawncare-form input[type="tel"] {
    width: 100%;
    padding: 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 16px;
    background: #ffffff;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

#lawncare-form select:focus,
#lawncare-form input[type="text"]:focus,
#lawncare-form input[type="email"]:focus,
#lawncare-form input[type="tel"]:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Disabled state */
#lawncare-form input[disabled] {
    background-color: #f9fafb;
    color: #6b7280;
    cursor: not-allowed;
}

/* Checkbox styling */
.checkbox-group {
    margin: 20px 0;
}

.checkbox-item {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    padding: 12px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    background: #ffffff;
    transition: all 0.2s ease;
}

.checkbox-item:hover {
    border-color: #3b82f6;
    background: #f8fafc;
}

.checkbox-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-right: 12px;
    accent-color: #3b82f6;
}

.checkbox-item label {
    font-size: 16px;
    color: #374151;
    margin: 0;
    cursor: pointer;
    flex: 1;
}

/* Submit button */
#lawncare-form button[type="submit"] {
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 20px;
}

#lawncare-form button[type="submit"]:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

#lawncare-form button[type="submit"]:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Address not found link */
#address-not-found-link {
    color: #3b82f6;
    text-decoration: none;
    font-size: 14px;
    display: inline-block;
    margin-top: 8px;
}

#address-not-found-link:hover {
    text-decoration: underline;
}

/* Autocomplete dropdown */
.autocomplete {
    position: absolute;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    max-height: 200px;
    overflow-y: auto;
    width: 100%;
    z-index: 1000;
    margin-top: 4px;
}

.autocomplete li {
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid #f3f4f6;
    font-size: 16px;
}

.autocomplete li:last-child {
    border-bottom: none;
}

.autocomplete li:hover {
    background: #f8fafc;
}

/* Address input container */
.address-input-container {
    position: relative;
}

/* Price output */
#price-output {
    background: #f8fafc;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
    text-align: center;
    display: none;
}

#price-output.show {
    display: block;
}

.price-amount {
    font-size: 32px;
    font-weight: 700;
    color: #059669;
    margin-bottom: 8px;
}

.price-frequency {
    color: #6b7280;
    font-size: 16px;
}

/* Address not found form */
#address-not-found-form {
    background: #ffffff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-top: 20px;
}

#address-not-found-form h3 {
    margin-top: 0;
    color: #374151;
    font-size: 20px;
}

#address-not-found-form button[type="submit"] {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

#address-not-found-form button[type="submit"]:hover {
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* Response messages */
#nf-response {
    margin-top: 16px;
    padding: 12px;
    border-radius: 6px;
    font-weight: 500;
}

#nf-response span {
    display: block;
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Mobile-specific improvements */
@media (max-width: 768px) {
    .lawncare-estimator-container {
        padding: 16px;
    }
    
    #lawncare-form,
    #address-not-found-form {
        padding: 20px;
        border-radius: 8px;
    }
    
    .form-group label {
        font-size: 15px;
    }
    
    #lawncare-form select,
    #lawncare-form input[type="text"],
    #lawncare-form input[type="email"],
    #lawncare-form input[type="tel"] {
        padding: 14px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .checkbox-item {
        padding: 10px;
    }
    
    .checkbox-item label {
        font-size: 15px;
    }
    
    #lawncare-form button[type="submit"] {
        padding: 14px 20px;
        font-size: 16px;
    }
    
    .price-amount {
        font-size: 28px;
    }
}

/* Tablet improvements */
@media (min-width: 769px) and (max-width: 1024px) {
    .lawncare-estimator-container {
        max-width: 600px;
    }
}

/* Desktop improvements */
@media (min-width: 1025px) {
    .lawncare-estimator-container {
        max-width: 500px;
    }
    
    #lawncare-form,
    #address-not-found-form {
        padding: 32px;
    }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
        animation: none !important;
    }
}

/* Error states */
#lawncare-form input.error,
#lawncare-form select.error {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

/* Back button */
.back-btn {
    background: #6b7280;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 14px;
    cursor: pointer;
    margin-bottom: 20px;
    transition: background-color 0.2s ease;
}

.back-btn:hover {
    background: #4b5563;
}

/* Loading state for inputs */
#lawncare-form input.loading {
    background-image: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTEwIDNDMTMuODY2IDMgMTcgNi4xMzQwMSAxNyAxMEMxNyAxMy44NjYgMTMuODY2IDE3IDEwIDE3QzYuMTM0MDEgMTcgMyAxMy44NjYgMyAxMEMzIDYuMTM0MDEgNi4xMzQwMSAzIDEwIDNaIiBzdHJva2U9IiM5Q0EzQUYiIHN0cm9rZS13aWR0aD0iMiIvPgo8cGF0aCBkPSJNMTAgM0MxMy44NjYgMyAxNyA2LjEzNDAxIDE3IDEwIiBzdHJva2U9IiMzQjgyRjYiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIi8+Cjwvc3ZnPgo=');
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 20px;
    padding-right: 40px;
}

/* No results styling */
.autocomplete li.no-results {
    color: #6b7280;
    font-style: italic;
    cursor: default;
}

.autocomplete li.no-results:hover {
    background: transparent;
}

/* High contrast mode */
@media (prefers-contrast: high) {
    #lawncare-form,
    #address-not-found-form {
        border: 2px solid #000000;
    }
    
    .checkbox-item {
        border: 2px solid #000000;
    }
} 
/* Green button color fix */
#lawncare-form button[type="submit"] {
    background: linear-gradient(135deg, #659237 0%, #5a7f2f 100%);
}

#lawncare-form button[type="submit"]:hover {
    box-shadow: 0 8px 25px rgba(101, 146, 55, 0.3);
}

.price-amount {
    color: #659237;
    font-weight: 700;
}

/* Chrome desktop dropdown visibility fix */
#lawncare-form select {
    color: #374151;
    background-color: #ffffff;
}

#lawncare-form select option {
    color: #374151;
    background-color: #ffffff;
}

#lawncare-form select option:checked {
    color: #374151;
    background-color: #e0e7ff;
    font-weight: 600;
}

/* Ensure selected text is visible in Chrome */
#lawncare-form select:focus {
    color: #374151;
}

#lawncare-form select:not([size]) {
    color: #374151;
}

/* Chrome dropdown overflow fix */
#lawncare-form select {
    overflow: visible;
    text-overflow: unset;
    white-space: normal;
    line-height: 1.2;
    padding: 12px 16px;
    height: auto;
    min-height: 48px;
    box-sizing: border-box;
}

/* Ensure text is fully visible */
#lawncare-form select option {
    padding: 8px 12px;
    line-height: 1.4;
    white-space: normal;
    overflow: visible;
}

/* Force text to be visible in Chrome */
#lawncare-form select:not([multiple]) {
    text-indent: 0;
    padding-left: 16px;
}

/* Override any height restrictions */
#lawncare-form select,
#lawncare-form select option {
    max-height: none;
    min-height: auto;
}

/* Modern address dropdown styling */
.ui-autocomplete {
    background: #374151;
    border: none;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
}

.ui-autocomplete .ui-menu-item {
    background: transparent;
    border: none;
    margin: 0;
    padding: 0;
}

.ui-autocomplete .ui-menu-item a {
    color: #ffffff;
    background: transparent;
    border: none;
    padding: 12px 16px;
    display: block;
    text-decoration: none;
    font-size: 14px;
    line-height: 1.4;
    transition: background-color 0.2s ease;
}

.ui-autocomplete .ui-menu-item a:hover {
    background-color: #4b5563;
    color: #ffffff;
}

.ui-autocomplete .ui-menu-item a.ui-state-focus {
    background-color: #4b5563;
    color: #ffffff;
    border: none;
}

/* Remove bullet points and default styling */
.ui-autocomplete .ui-menu-item {
    list-style: none;
}

.ui-autocomplete .ui-menu-item::before {
    content: none;
}

/* Ensure dropdown appears above other elements */
.ui-autocomplete {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 4px;
}
