/* Ultra-Enhanced Form - Premium UI Design */

/* Reset and base styles */
* {
    box-sizing: border-box;
}

/* Navbar style removed to inherit from common-style.css */
/* .navbar {
    background-image: radial-gradient(circle, #171424, black);
    position: relative;
    z-index: 100;
} */

/* Main container - clean background matching site design */
.form-main {
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 20px 20px 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    position: relative;
    overflow-y: auto;
}

/* Clean form container - properly sized */
.form-container {
    width: 100%;
    max-width: 600px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: visible;
    margin: 0 auto;
}

/* Premium header with enhanced design */
.form-header {
    background: linear-gradient(135deg, #eb595f 0%, #d63d44 50%, #c1343a 100%);
    color: white;
    padding: 15px 25px;
    text-align: center;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.form-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: 
        radial-gradient(circle, rgba(255,255,255,0.15) 0%, transparent 50%),
        linear-gradient(45deg, transparent 40%, rgba(255,255,255,0.1) 50%, transparent 60%);
    animation: headerShimmer 4s ease-in-out infinite;
}

.form-header h1 {
    margin: 0;
    font-size: 1.6rem;
    font-weight: 800;
    line-height: 1.1;
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
    letter-spacing: -0.5px;
    position: relative;
    z-index: 1;
}

.form-header p {
    margin: 5px 0 0 0;
    opacity: 0.95;
    font-size: 0.9rem;
    line-height: 1.2;
    font-weight: 400;
    position: relative;
    z-index: 1;
}

/* Clean form styling - compact */
.ultra-compact-form {
    padding: 18px;
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: visible;
}

/* Compact grid layout */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 18px 20px;
    margin-bottom: 20px;
}

/* Input groups with glassmorphism */
.input-group {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.input-group.span-full {
    grid-column: 1 / -1;
}

.input-group.dropdown-group {
    z-index: 10;
    position: relative;
}

/* Clean inputs */
.input-group input {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: #ffffff !important;
    color: #1a202c !important;
    height: 45px;
    line-height: 1.3;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.input-group input:focus {
    outline: none;
    border-color: #eb595f;
    box-shadow: 0 0 0 3px rgba(235, 89, 95, 0.15);
    transform: translateY(-1px);
}

/* Special styling when dropdown is active */
.input-group.dropdown-group input:focus {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    transform: none;
}

.input-group input:valid {
    border-color: #28a745;
}

/* Clean floating labels */
.input-group label {
    position: absolute;
    left: 14px;
    top: 16px;
    color: #666;
    font-size: 13px;
    transition: all 0.3s ease;
    pointer-events: none;
    background: white;
    padding: 0 4px;
    line-height: 1;
    font-weight: 600;
}

.input-group input:focus + label,
.input-group input:valid + label,
.input-group input:not(:placeholder-shown) + label,
.input-group select:focus + label,
.input-group select:valid + label {
    top: -8px;
    font-size: 10px;
    color: #eb595f;
    font-weight: 700;
    transform: translateX(-2px);
}

/* Select dropdown styling */
.input-group select {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: #ffffff !important;
    color: #1a202c !important;
    height: 45px !important;
    line-height: 1.3;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    appearance: none;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'%3e%3cpath fill='%23666' d='M2 0L0 2h4zm0 5L0 3h4z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 12px;
}

.input-group select:focus {
    outline: none;
    border-color: #eb595f;
    box-shadow: 0 0 0 3px rgba(235, 89, 95, 0.15);
    transform: translateY(-1px);
}

.input-group select:valid {
    border-color: #28a745;
}

.input-group select + label {
    position: absolute;
    left: 12px;
    top: -8px;
    color: #eb595f;
    font-size: 10px;
    background: white;
    padding: 0 4px;
    line-height: 1;
    font-weight: 700;
    transform: translateX(-2px);
    z-index: 1;
}

.input-group select:invalid + label {
    font-size: 13px;
    color: #666;
    font-weight: 600;
}

/* Clean dropdown lists */
.dropdown-list {
    position: absolute;
    top: calc(100% - 3px);
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #eb595f;
    border-top: none;
    border-radius: 0 0 8px 8px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 9999;
    display: none;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.dropdown-item {
    padding: 12px 15px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.15s ease;
    font-size: 14px;
    line-height: 1.4;
    font-weight: 500;
    color: #333;
    background: white;
}

.dropdown-item:hover,
.dropdown-item.selected {
    background-color: #eb595f;
    color: white;
    font-weight: 600;
    transform: translateX(2px);
}

.dropdown-item:last-child {
    border-bottom: none;
    border-radius: 0 0 6px 6px;
}

/* Clean consent checkbox */
.consent-checkbox {
    margin: 10px 0 8px 0;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e1e5e9;
}

.checkbox-container {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    line-height: 1.3;
    font-size: 12px;
    color: #555;
    font-weight: 500;
}

.checkbox-container input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 16px;
    height: 16px;
    background: white;
    border: 2px solid #e1e5e9;
    border-radius: 3px;
    position: relative;
    flex-shrink: 0;
    margin-top: 1px;
    transition: all 0.3s ease;
}

.checkbox-container:hover .checkmark {
    border-color: #eb595f;
}

.checkbox-container input[type="checkbox"]:checked + .checkmark {
    background: #eb595f;
    border-color: #eb595f;
}

.checkbox-container input[type="checkbox"]:checked + .checkmark:after {
    content: "";
    position: absolute;
    left: 5px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.consent-text {
    flex: 1;
}

.consent-text a {
    color: #eb595f;
    text-decoration: none;
    font-weight: 600;
}

.consent-text a:hover {
    text-decoration: underline;
}

/* Clean submit button */
.submit-btn {
    width: 100%;
    background: linear-gradient(135deg, #eb595f, #d63d44);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
    height: 45px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 6px 15px rgba(235, 89, 95, 0.3);
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(235, 89, 95, 0.4);
}

.submit-btn:active {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(235, 89, 95, 0.3);
}

.submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Clean success message */
.success-message {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    text-align: center;
    border-radius: 15px;
    z-index: 1000;
}

.success-icon i {
    font-size: 4rem;
    margin-bottom: 20px;
    animation: successBounce 0.8s ease-out;
}

.success-message h3 {
    font-size: 2rem;
    margin: 0 0 12px 0;
    font-weight: 700;
}

.success-message p {
    font-size: 1.2rem;
    opacity: 0.95;
    margin: 0;
    line-height: 1.4;
}

/* Clean animations */
@keyframes headerShimmer {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

@keyframes successBounce {
    0% { transform: scale(0.3); opacity: 0; }
    50% { transform: scale(1.1); }
    70% { transform: scale(0.9); }
    100% { transform: scale(1); opacity: 1; }
}

.success-message {
    animation: successFadeIn 0.5s ease-out;
}

@keyframes successFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Custom scrollbar */
.dropdown-list::-webkit-scrollbar {
    width: 6px;
}

.dropdown-list::-webkit-scrollbar-track {
    background: #f8f9fa;
    border-radius: 3px;
}

.dropdown-list::-webkit-scrollbar-thumb {
    background: #eb595f;
    border-radius: 3px;
    transition: background 0.2s ease;
}

.dropdown-list::-webkit-scrollbar-thumb:hover {
    background: #d63d44;
}

/* Tablet responsiveness */
@media (max-width: 768px) {
    .form-main {
        padding: 80px 15px 20px;
    }
    
    .form-container {
        max-width: 95%;
        border-radius: 12px;
    }
    
    .form-header {
        padding: 18px 20px;
    }
    
    .form-header h1 {
        font-size: 1.6rem;
    }
    
    .form-header p {
        font-size: 0.9rem;
    }
    
    .ultra-compact-form {
        padding: 20px;
    }
      .form-grid {
        grid-template-columns: 1fr 1fr;
        gap: 15px 18px;
    }
    
    .input-group input,
    .input-group select {
        height: 44px;
        padding: 11px 13px;
        font-size: 13px;
    }
    
    .input-group label {
        font-size: 13px;
        top: 16px;
        left: 13px;
    }
    
    .input-group input:focus + label,
    .input-group input:valid + label,
    .input-group input:not(:placeholder-shown) + label {
        font-size: 10px;
        top: -7px;
    }
      .submit-btn {
        height: 48px;
        font-size: 15px;
        margin-top: 10px;
    }
    
    .consent-checkbox {
        margin: 12px 0 10px 0;
    }
    
    .checkbox-container {
        font-size: 10px;
        gap: 10px;
    }
    
    .checkmark {
        width: 16px;
        height: 16px;
    }
    
    .checkbox-container input[type="checkbox"]:checked + .checkmark:after {
        left: 4px;
        top: 1px;
        width: 3px;
        height: 7px;
    }
      .dropdown-list {
        max-height: 160px;
    }
    
    .dropdown-item {
        padding: 10px 14px;
        font-size: 14px;
    }
}

/* Mobile responsiveness */
@media (max-width: 480px) {
    .form-main {
        padding: 70px 8px 20px;
    }
    
    .form-container {
        max-width: 100%;
        border-radius: 10px;
    }
    
    .form-header {
        padding: 15px 18px;
    }
    
    .form-header h1 {
        font-size: 1.4rem;
    }
    
    .form-header p {
        font-size: 0.9rem;
    }
    
    .ultra-compact-form {
        padding: 18px 18px 15px;
    }
      .form-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .input-group input,
    .input-group select {
        height: 42px;
        padding: 10px 12px;
        font-size: 14px;
    }
    
    .input-group label {
        font-size: 14px;
        top: 14px;
        left: 12px;
    }
    
    .input-group input:focus + label,
    .input-group input:valid + label,
    .input-group input:not(:placeholder-shown) + label {
        font-size: 10px;
        top: -7px;
    }    .submit-btn {
        height: 48px;
        font-size: 14px;
        margin-top: 10px;
    }
    
    .consent-checkbox {
        margin: 10px 0 8px 0;
        padding: 10px;
    }
    
    .checkbox-container {
        font-size: 9px;
        gap: 8px;
    }
    
    .checkmark {
        width: 14px;
        height: 14px;
    }
    
    .checkbox-container input[type="checkbox"]:checked + .checkmark:after {
        left: 3px;
        top: 1px;
        width: 3px;
        height: 6px;
    }
      .dropdown-list {
        max-height: 140px;
    }
    
    .dropdown-item {
        padding: 9px 12px;
        font-size: 13px;
    }
    
    .success-icon i {
        font-size: 2.5rem;
    }
    
    .success-message h3 {
        font-size: 1.4rem;
    }
    
    .success-message p {
        font-size: 0.9rem;
    }
}

/* High resolution / large screens optimization */
@media (min-width: 1200px) {
    .form-container {
        max-width: 1100px;
    }
    
    .form-header {
        padding: 30px 40px;
    }
    
    .form-header h1 {
        font-size: 2.5rem;
    }
    
    .form-header p {
        font-size: 1.2rem;
    }
    
    .ultra-compact-form {
        padding: 35px 40px 30px;
    }
    
    .form-grid {
        gap: 25px 30px;
    }
    
    .input-group input {
        height: 58px;
        padding: 16px 20px;
        font-size: 17px;
    }
    
    .input-group label {
        font-size: 17px;
        top: 20px;
        left: 20px;
    }
    
    .submit-btn {        height: 65px;
        font-size: 19px;
    }
}

/* ==========================================================
   Multi-step Form UI - HomeAdvisor Inspired
========================================================== */
.step-indicator {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px 0 30px;
    padding: 0 40px;
    position: relative;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}
.step-indicator::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 40px;
    right: 40px;
    height: 4px;
    background: #e1e5e9;
    z-index: 0;
    transform: translateY(-50%);
    border-radius: 2px;
}
.step {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #fff;
    color: #a0aab5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 18px;
    transition: all 0.3s ease;
    border: 4px solid #e1e5e9;
    position: relative;
    z-index: 1;
}
.step.active {
    border-color: #eb595f;
    color: #eb595f;
    box-shadow: 0 0 0 4px rgba(235, 89, 95, 0.1);
}
.step.completed {
    background: #28a745;
    border-color: #28a745;
    color: white;
}

.step i {
    display: none;
    font-size: 20px;
}

.step.completed span {
    display: none;
}

.step.completed i {
    display: block;
    animation: bounceIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes bounceIn {
    0% { transform: scale(0.3); opacity: 0; }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

.form-step {
    display: none;
    animation: fadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 10px 20px 30px;
}
.form-step.active {
    display: block;
}

.step-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 35px;
    gap: 20px;
}
.btn-next, .btn-prev {
    padding: 16px 30px;
    border-radius: 8px;
    font-weight: 800;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.btn-next {
    background: #eb595f;
    color: white;
    flex: 1;
    box-shadow: 0 4px 12px rgba(235, 89, 95, 0.25);
    text-transform: uppercase;
    letter-spacing: 1px;
}
.btn-next:hover {
    background: #d63d44;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(235, 89, 95, 0.35);
}
.btn-prev {
    background: #f8f9fa;
    color: #495057;
    border: 2px solid #e1e5e9;
    min-width: 120px;
}
.btn-prev:hover {
    background: #e1e5e9;
    color: #212529;
}

/* Service Selection Cards - HomeAdvisor Style Grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 25px;
}
@media (min-width: 600px) {
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
.service-card {
    background: white;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    padding: 24px 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.service-card:hover {
    border-color: #eb595f;
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(235, 89, 95, 0.15);
}
.service-card.selected {
    border-color: #eb595f;
    background: #fffdfd;
    box-shadow: 0 0 0 1px #eb595f, 0 8px 24px rgba(235, 89, 95, 0.1);
}
.service-card i {
    font-size: 36px;
    color: #eb595f;
    margin-bottom: 5px;
    transition: transform 0.3s ease;
}
.service-card:hover i {
    transform: scale(1.1);
}
.service-card span {
    font-size: 16px;
    font-weight: 700;
    color: #2c3e50;
    display: block;
}

/* Specific styling for 'Other' container */
.other-service-container {
    margin-top: 20px;
    display: none;
}
.other-service-container.active {
    display: block;
    animation: fadeIn 0.4s ease;
}

/* ZIP Code Massive Input (Step 1 Focus) */
#step-1 .input-group {
    max-width: 320px;
    margin: 40px auto;
}
#step-1 input#zip {
    font-size: 26px;
    height: 70px;
    text-align: center;
    letter-spacing: 6px;
    font-weight: 800;
    border-width: 3px;
}
#step-1 label[for="zip"] {
    font-size: 18px;
    left: 20px;
    top: 24px;
}
#step-1 input#zip:focus + label,
#step-1 input#zip:valid + label,
#step-1 input#zip:not(:placeholder-shown) + label {
    font-size: 13px;
    top: -12px;
    transform: translateX(0);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Override potential dark mode extensions that ruin cards */
.form-container {
    background: #ffffff !important;
}
.form-step h3 {
    color: #2c3e50 !important;
    font-size: 1.8rem;
}

/* Custom Radio Buttons */
.radio-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    color: #495057;
    position: relative;
    padding-left: 32px;
    transition: all 0.2s ease;
}

.radio-label:hover {
    color: #eb595f;
}

.radio-label input[type="radio"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.radio-custom {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    height: 22px;
    width: 22px;
    background-color: #fff;
    border: 2px solid #e1e5e9;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.radio-label:hover input ~ .radio-custom {
    border-color: #eb595f;
}

.radio-label input:checked ~ .radio-custom {
    border-color: #eb595f;
    background-color: #eb595f;
    box-shadow: inset 0 0 0 4px #fff;
}

/* Call Now Button Enhancements */
.call-now-btn:hover {
    background: linear-gradient(135deg, #218838, #17a27a) !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(40, 167, 69, 0.45) !important;
}

.call-now-btn:active {
    transform: translateY(0);
}

/* Homeowner Yes/No Cards */
.homeowner-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 28px;
}

.homeowner-card {
    position: relative;
    background: white;
    border: 2.5px solid #e1e5e9;
    border-radius: 16px;
    padding: 28px 20px 22px;
    text-align: center;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    overflow: hidden;
}

.homeowner-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(235,89,95,0.04), rgba(235,89,95,0));
    opacity: 0;
    transition: opacity 0.25s ease;
}

.homeowner-card:hover {
    border-color: #eb595f;
    transform: translateY(-5px);
    box-shadow: 0 14px 30px rgba(235, 89, 95, 0.18);
}

.homeowner-card:hover::before {
    opacity: 1;
}

.homeowner-card.selected {
    border-color: #eb595f;
    background: linear-gradient(135deg, #fff8f8, #fff);
    box-shadow: 0 0 0 2px #eb595f, 0 12px 28px rgba(235, 89, 95, 0.2);
}

.homeowner-card-icon {
    font-size: 2.5rem;
    color: #ccc;
    margin-bottom: 12px;
    transition: all 0.25s ease;
}

.homeowner-card:hover .homeowner-card-icon,
.homeowner-card.selected .homeowner-card-icon {
    color: #eb595f;
    transform: scale(1.1);
}

.homeowner-card-label {
    font-size: 0.95rem;
    font-weight: 700;
    color: #4a5568;
    line-height: 1.3;
    transition: color 0.2s ease;
}

.homeowner-card.selected .homeowner-card-label {
    color: #eb595f;
}

.homeowner-card-check {
    position: absolute;
    top: 10px;
    right: 12px;
    font-size: 1.3rem;
    color: #eb595f;
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.homeowner-card.selected .homeowner-card-check {
    opacity: 1;
    transform: scale(1);
}
