/* Quote Builder Styles */
.quote-builder-container {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: transparent;
}

/* Main Layout with Sidebar */
.quote-main-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 30px;
    align-items: start;
    position: relative;
    width: 100%;
}

@media (min-width: 1025px) {
    .quote-main-layout {
        display: grid !important;
        grid-template-columns: 1fr 380px !important;
    }
}

.quote-steps-container {
    min-width: 0;
    width: 100%;
}

/* Sticky Summary Sidebar (Desktop) */
.quote-summary-sidebar {
    position: sticky;
    top: 200px;
    background: rgba(1, 6, 14, 0.9);
    border: 1px solid rgba(61, 174, 233, 0.3);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(61, 174, 233, 0.2);
    backdrop-filter: blur(10px);
    align-self: start;
    height: fit-content;
    max-height: calc(100vh - 40px);
    display: block; 
}

.summary-sidebar-inner {
    padding: 25px;
}

.summary-title {
    color: #3daee9;
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 20px 0;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(61, 174, 233, 0.3);
}

.sidebar-services {
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 20px;
}

.sidebar-services::-webkit-scrollbar {
    width: 6px;
}

.sidebar-services::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.sidebar-services::-webkit-scrollbar-thumb {
    background: rgba(61, 174, 233, 0.5);
    border-radius: 3px;
}

.sidebar-services::-webkit-scrollbar-thumb:hover {
    background: rgba(61, 174, 233, 0.7);
}

.empty-message {
    color: rgba(255, 255, 255, 0.5);
    text-align: center;
    padding: 30px 20px;
    font-size: 14px;
    margin: 0;
}

.sidebar-service-item {
    padding: 12px 0;
    border-bottom: 1px solid rgba(61, 174, 233, 0.15);
    display: flex;
    justify-content: space-between;
    align-items: start;
}

.sidebar-service-item:last-child {
    border-bottom: none;
}

.sidebar-service-name {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    font-weight: 500;
    flex: 1;
    line-height: 1.4;
}

.sidebar-service-qty {
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
    margin-right: 10px;
}

.sidebar-service-price {
    color: #3daee9;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
}

.summary-totals {
    margin-top: 20px;
}

.summary-totals hr {
    border: none;
    border-top: 1px solid rgba(61, 174, 233, 0.2);
    margin: 15px 0;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    color: rgba(255, 255, 255, 0.8);
    font-size: 15px;
}

.summary-row span:last-child {
    color: #3daee9;
    font-weight: 600;
}

.total-row {
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
    padding-top: 15px;
}

.total-row span:last-child {
    color: #3daee9;
    font-size: 24px;
}

/* Mobile Responsive */
@media (max-width: 1024px) {
    .quote-main-layout {
        display: block !important;
        grid-template-columns: 1fr !important;
        padding-bottom: 180px;
    }
    
    .quote-summary-sidebar {
        position: fixed !important;
        bottom: 0;
        left: 0;
        right: 0;
        top: auto;
        z-index: 1000;
        border-radius: 20px 20px 0 0;
        max-height: 60vh;
        overflow-y: auto;
        box-shadow: 0 -4px 30px rgba(61, 174, 233, 0.3);
    }
    
    .summary-sidebar-inner {
        padding: 20px;
    }
    
    .summary-title {
        font-size: 18px;
        margin-bottom: 15px;
        padding-bottom: 12px;
    }
    
    .sidebar-services {
        max-height: 200px;
        /* Hide services list to keep summary minimal on mobile */
        display: none; 
    }
    
    /* Mobile Optimization for Summary Totals: Only show Total and Estimated Time */
    .summary-totals .summary-row:not(.total-row):not(#sidebar-time-row):not(hr) {
        display: none !important; 
    }

    .summary-totals hr {
        display: none !important;
    }
    /* End Mobile Optimization */
    
    .total-row {
        font-size: 18px;
    }
    
    .total-row span:last-child {
        font-size: 22px;
    }
}

@media (max-width: 768px) {
    .quote-builder-container {
        padding: 10px;
    }
    
    .quote-card {
        padding: 20px;
    }
    
    .button-group {
        flex-direction: column;
    }
    
    .service-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .quantity-controls {
        width: 100%;
        justify-content: center;
    }
}

/* Step Progress Indicator */
.step-progress {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
    padding: 20px;
    background: rgba(1, 6, 14, 0.6);
    border-radius: 12px;
    border: 1px solid rgba(61, 174, 233, 0.2);
}

.progress-step {
    flex: 1;
    text-align: center;
    position: relative;
    padding: 0 10px;
}

.progress-step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 20px;
    right: -50%;
    width: 100%;
    height: 2px;
    background: rgba(61, 174, 233, 0.2);
    z-index: 0;
}

.progress-step.active:not(:last-child)::after {
    background: #3daee9;
}

.progress-step.completed:not(:last-child)::after {
    background: #3daee9;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(1, 6, 14, 0.8);
    color: rgba(255, 255, 255, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 8px;
    font-weight: bold;
    border: 2px solid rgba(61, 174, 233, 0.3);
    position: relative;
    z-index: 1;
}

.progress-step.active .step-number {
    background: #3daee9;
    color: #01060E;
    border-color: #3daee9;
    box-shadow: 0 0 20px rgba(61, 174, 233, 0.5);
}

.progress-step.completed .step-number {
    background: #3daee9;
    color: #01060E;
    border-color: #3daee9;
}

.step-label {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 500;
}

.progress-step.active .step-label {
    color: #3daee9;
}

.progress-step.completed .step-label {
    color: #3daee9;
}

@media (max-width: 768px) {
    .step-progress {
        flex-wrap: wrap;
        gap: 15px;
    }
    
    .progress-step {
        flex: 0 0 calc(50% - 7.5px);
    }
    
    .progress-step:not(:last-child)::after {
        display: none;
    }
    
    .step-label {
        font-size: 11px;
    }
}

.quote-step {
    animation: fadeIn 0.3s ease-in;
}

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

/* Step Header */
.step-header {
    text-align: center;
    margin-bottom: 30px;
}

.step-icon {
    font-size: 48px;
    margin-bottom: 10px;
}

.step-header h2 {
    color: #ffffff;
    font-size: 28px;
    margin: 10px 0;
}

.step-header p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 16px;
}

/* Quote Card */
.quote-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
}

.quote-card h3 {
    color: #ffffff;
    margin-top: 0;
}

.quote-card p {
    color: rgba(255, 255, 255, 0.8);
}

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

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

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

.form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.2s;
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.form-control:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
    background: rgba(255, 255, 255, 0.1);
}

.readonly-field {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 12px;
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.9);
}

.form-text {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: #3daee9;
    color: #01060E;
    border: 1px solid #3daee9;
}

.btn-primary:hover {
    background: #2d9ed9;
    box-shadow: 0 0 20px rgba(61, 174, 233, 0.4);
}

.btn-block {
    width: 100%;
}

.btn-next {
    background: #3daee9;
    color: #01060E;
    padding: 14px 32px;
    border: 1px solid #3daee9;
}

.btn-next:hover {
    background: #2d9ed9;
    box-shadow: 0 0 20px rgba(61, 174, 233, 0.4);
}

.btn-back {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-back:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: #3daee9;
}

.btn-submit {
    background: #3daee9;
    color: #01060E;
    font-size: 18px;
    padding: 16px 32px;
    border: 1px solid #3daee9;
}

.btn-submit:hover {
    background: #2d9ed9;
    box-shadow: 0 0 30px rgba(61, 174, 233, 0.5);
}

.button-group {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.button-group .btn {
    flex: 1;
}

/* Distance Result */
.distance-result {
    background: rgba(1, 6, 14, 0.8);
    border: 1px solid rgba(61, 174, 233, 0.5);
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 0 20px rgba(61, 174, 233, 0.2);
}

.distance-result h4 {
    color: #3daee9;
    margin: 0 0 10px 0;
}

.distance-result p {
    color: rgba(255, 255, 255, 0.9);
    margin: 5px 0;
}

.travel-fee {
    font-size: 24px;
    font-weight: bold;
    color: #3daee9;
}

/* Info Box */
.info-box {
    background: rgba(1, 6, 14, 0.6);
    border-left: 4px solid #3daee9;
    padding: 15px 20px;
    margin: 20px 0;
    border-radius: 4px;
}

.info-box h4 {
    color: #3daee9;
    margin: 0 0 10px 0;
    font-size: 16px;
}

.info-box ul {
    margin: 0;
    padding-left: 20px;
    color: rgba(255, 255, 255, 0.8);
}

.info-box li {
    margin: 5px 0;
    font-size: 14px;
}

.info-box p {
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
}

/* Search Box */
.search-box {
    margin-bottom: 20px;
}

.search-box .form-control {
    font-size: 18px;
    padding: 15px;
}

/* Search No Results Message */
.search-no-results {
    background: rgba(61, 174, 233, 0.1);
    border: 2px dashed rgba(61, 174, 233, 0.4);
    border-radius: 8px;
    margin: 30px 0;
}

.search-no-results p {
    margin: 10px 0;
    color: #999;
}

.search-no-results strong {
    color: rgba(61, 174, 233, 0.8);
}

.search-no-results ul {
    text-align: left;
    display: inline-block;
}

.search-no-results li {
    color: #999;
    margin: 5px 0;
}

/* Service Categories */
.service-category {
    margin-bottom: 15px;
    border: 1px solid rgba(61, 174, 233, 0.2);
    border-radius: 8px;
    overflow: hidden;
    background: rgba(1, 6, 14, 0.6);
}

.category-header {
    background: linear-gradient(135deg, rgba(61, 174, 233, 0.25), rgba(61, 174, 233, 0.15));
    color: white;
    padding: 15px 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s;
    border-bottom: 1px solid rgba(61, 174, 233, 0.3);
}

.category-header:hover {
    background: linear-gradient(135deg, rgba(61, 174, 233, 0.35), rgba(61, 174, 233, 0.25));
}

.category-header h3 {
    margin: 0;
    font-size: 18px;
    color: #ffffff;
}

.category-content {
    display: none;
}

.subcategory {
    border-bottom: 1px solid rgba(61, 174, 233, 0.15);
}

.subcategory:last-child {
    border-bottom: none;
}

.subcategory-header {
    background: rgba(1, 6, 14, 0.8);
    padding: 12px 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s;
    border-bottom: 1px solid rgba(61, 174, 233, 0.1);
}

.subcategory-header:hover {
    background: rgba(1, 6, 14, 0.95);
    border-bottom-color: rgba(61, 174, 233, 0.3);
}

.subcategory-header h4 {
    margin: 0;
    font-size: 16px;
    color: #ffffff;
    font-weight: 600;
}

/* Subcategory Description (Irrelevant, but kept clean) */
.subcategory-description {
    margin: 3px 0 0 0;
    font-size: 12px;
    color: #3daee9; 
    font-weight: 500;
}

.subcategory-content {
    display: none;
    padding: 15px;
    background: rgba(0, 0, 0, 0.4);
}

.toggle-icon {
    font-size: 14px;
    transition: transform 0.2s;
    color: #3daee9;
}

/* Service Items */
.service-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border: 1px solid rgba(61, 174, 233, 0.2);
    border-radius: 6px;
    margin-bottom: 10px;
    transition: all 0.2s;
    background: rgba(1, 6, 14, 0.5);
}

.service-item:hover {
    border-color: #3daee9;
    background: rgba(1, 6, 14, 0.8);
    box-shadow: 0 0 15px rgba(61, 174, 233, 0.2);
}

.service-info {
    flex: 1;
}

.service-info h5 {
    margin: 0 0 5px 0;
    color: #ffffff;
    font-size: 15px;
    font-weight: 500;
}

.service-description {
    margin: 8px 0 10px 0;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 400;
    line-height: 1.4;
}

/* Service Item Description (Irrelevant, but kept clean) */
.service-description-size {
    margin: 0 0 5px 0;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 400;
}

.service-meta {
    display: flex;
    gap: 15px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
}

.service-meta span:first-child {
    color: rgba(255, 255, 255, 0.7);
}

.service-meta .price {
    font-weight: 600;
    color: #3daee9;
}

/* Quantity Controls */
.quantity-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* FIX: Restore Button Styling */
.btn-qty {
    width: 32px;
    height: 32px;
    border: 1px solid rgba(61, 174, 233, 0.4);
    background: transparent; /* Reset background to transparent or dark primary */
    border-radius: 4px;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    color: #3daee9; /* Primary Blue color */
    background: rgba(1, 6, 14, 0.8); /* Dark background */
}

.btn-qty:hover {
    border-color: #3daee9;
    background: rgba(61, 174, 233, 0.2); /* Light blue background on hover */
    box-shadow: 0 0 10px rgba(61, 174, 233, 0.3);
}

.btn-plus {
    border-color: #3daee9;
    color: #3daee9;
}

.btn-plus:hover {
    background: #3daee9; /* Solid blue on + hover */
    color: #01060E; /* Dark text on solid blue */
}

.qty-display {
    min-width: 30px;
    text-align: center;
    font-weight: 600;
    font-size: 16px;
    color: #ffffff;
}

/* Summary Card */
.summary-card {
    background: rgba(1, 6, 14, 0.8);
    border: 1px solid rgba(61, 174, 233, 0.4);
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 0 20px rgba(61, 174, 233, 0.2);
}

.summary-card h3 {
    color: #3daee9;
    margin: 0 0 15px 0;
    font-size: 18px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    border-bottom: 1px solid rgba(61, 174, 233, 0.1);
}

.summary-item:last-child {
    border-bottom: none;
}

.summary-item span:last-child {
    color: #3daee9;
    font-weight: 600;
}

/* Summary Rows */
.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    color: rgba(255, 255, 255, 0.9);
}

.summary-row strong {
    color: #ffffff;
}

.summary-row div:last-child,
.summary-row strong:last-child {
    color: #3daee9;
}

.summary-row.total {
    font-size: 20px;
    color: #ffffff;
    padding-top: 15px;
}

.summary-row.total strong:last-child {
    color: #3daee9;
}

.summary-row.time-estimate {
    font-size: 18px;
    color: #ffffff;
    border-top: 1px solid rgba(61, 174, 233, 0.2);
    padding-top: 15px;
    margin-top: 10px;
}

.summary-row.time-estimate strong:last-child {
    color: #3daee9;
}

hr {
    border: none;
    border-top: 1px solid rgba(61, 174, 233, 0.2);
    margin: 15px 0;
}

/* Success Message */
.success-message {
    text-align: center;
    padding: 40px 20px;
}

.success-icon {
    font-size: 80px;
    margin-bottom: 20px;
}

.success-message h2 {
    color: #3daee9;
    font-size: 32px;
    margin: 10px 0;
}

.success-message p {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.8);
    margin: 10px 0;
}

.quote-reference {
    margin-top: 30px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
}

.quote-reference span {
    color: #3daee9;
    font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
    .quote-builder-container {
        padding: 10px;
    }
    
    .quote-card {
        padding: 20px;
    }
    
    .button-group {
        flex-direction: column;
    }
    
    .service-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .quantity-controls {
        width: 100%;
        justify-content: center;
    }
}