/* ==========================================================================
   Handled BOOKING CONFIGURATOR - MASTER STYLESHEET
   ========================================================================== */

/* --- Progress Stepper Layout Component --- */
.steps-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 950px;
    margin: 32px auto;
    padding: 0 24px;
}

.step {
    display: flex;
    align-items: center;
    gap: 12px;
}

.step-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.25s ease;
    background-color: var(--border);
    color: var(--text-muted);
}

.step-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    transition: all 0.25s ease;
}

/* Stepper Functional States */
.step.done .step-circle {
    background-color: var(--primary);
    color: var(--white);
}
.step.done .step-label {
    color: var(--primary);
    font-weight: 500;
}

.step.active .step-circle {
    background-color: var(--text-primary);
    color: var(--white);
}
.step.active .step-label {
    color: var(--text-primary);
    font-weight: 500;
}

.step-divider {
    flex: 1;
    height: 1px;
    background-color: var(--border);
    margin: 0 16px;
    min-width: 24px;
    transition: background-color 0.3s ease;
}
.step-divider.filled {
    background-color: var(--primary);
}

.step-panel {
    display: none;
}
.step-panel.active {
    display: block;
}

/* --- Uniform Global Photo Upload Component --- */
.static-upload-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 24px;
    margin-top: 24px;
}

.static-upload-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 6px 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.static-upload-title span {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 400;
}

.static-upload-subtitle {
    font-size: 13px;
    color: #8c8c8c;
    margin: 0 0 20px 0;
}

.dropzone-container {
    border: 1px dashed var(--text-light);
    border-radius: 6px;
    padding: 36px 20px;
    text-align: center;
    background: var(--white);
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.dropzone-container:hover {
    background: var(--bg-accent);
    border-color: var(--primary);
}

.dropzone-icon {
    font-size: 24px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.dropzone-text {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin: 0 0 4px 0;
}

.dropzone-subtext {
    font-size: 11px;
    color: var(--text-muted);
    margin: 0;
}

/* Photo Upload List View Design Layout */
.uploaded-files-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 16px;
}

.uploaded-file-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 10px 14px;
}

.file-row-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.file-icon-badge {
    font-size: 16px;
}

.file-row-details {
    display: flex;
    flex-direction: column;
}

.file-meta-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
}

.file-meta-size {
    font-size: 11px;
    color: var(--text-muted);
}

.remove-file-action-btn {
    background: transparent;
    border: none;
    color: #ef4444;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.remove-file-action-btn:hover {
    background-color: #fef2f2;
}

/* --- App Layout Framework Matrix --- */
.configurator-wrapper {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    margin-top: 24px;
    align-items: start;
}

@media (min-width: 992px) {
    .configurator-wrapper {
        grid-template-columns: 1fr 360px;
    }
}

.book-a-job-page .card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}

.book-a-job-page .card-head {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    background: var(--white);
}

.book-a-job-page .card-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.book-a-job-page .card-body {
    padding: 20px;
}

.book-a-job-page .card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
    gap: 16px;
}

/* Selectable Dynamic Grid Option Cards */
.selectable-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 20px;
    cursor: pointer;
    position: relative;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.selectable-card:hover {
    border-color: var(--text-light);
}

.selectable-card.selected {
    border-color: var(--primary);
    background-color: var(--bg-accent);
}

.selectable-card .tick {
    display: none;
    position: absolute;
    top: 14px;
    right: 14px;
    width: 20px;
    height: 20px;
    background: var(--primary);
    color: var(--white);
    border-radius: 50%;
    text-align: center;
    line-height: 20px;
    font-size: 11px;
    font-weight: bold;
}

.selectable-card.selected .tick {
    display: block;
}

.selectable-card .icon {
    font-size: 1.75rem;
    color: var(--text-secondary);
    display: inline-block;
    margin-bottom: 8px;
}

.selectable-card.selected .icon {
    color: var(--primary);
}

.selectable-card h3 {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 4px 0;
    color: var(--text-primary);
}

.selectable-card p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.4;
    margin: 0;
}

/* Functional Component Groups (Pills & Counters) */
.pill-group {
    display: flex;
    gap: 12px;
}

.pill-btn {
    flex: 1;
    padding: 12px;
    border: 1px solid var(--border);
    background: var(--white);
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.pill-btn:hover {
    border-color: var(--text-light);
}

.pill-btn.selected {
    border-color: var(--primary);
    background: var(--bg-accent);
    color: var(--primary);
}

/* Live Quote Sticky Summary Panel Section */
.quote-sidebar {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 24px;
    position: sticky;
    top: 24px;
}

@media (max-width: 991px) {
    .configurator-wrapper {
        margin-bottom: calc(88px + env(safe-area-inset-bottom, 0px));
        min-width: 0;
        max-width: 100%;
        width: 100%;
    }
    .configurator-wrapper.step-confirm {
        margin-bottom: 0;
    }
    .book-a-job-page .form-flow,
    .book-a-job-page .card,
    .book-a-job-page .card-body,
    .book-a-job-page .static-upload-card {
        min-width: 0;
        max-width: 100%;
    }
    .book-a-job-page .static-upload-card {
        padding: 16px;
    }
    .book-a-job-page .card-body {
        padding: 16px;
    }
    .quote-sidebar {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        max-width: 100%;
        border-radius: 12px 12px 0 0;
        box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.1);
        z-index: 999;
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        gap: 10px 12px;
        padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
        box-sizing: border-box;
    }
    .quote-sidebar .quote-total-row {
        flex: 1 1 auto;
        min-width: 0;
        margin-bottom: 0;
    }
    .quote-sidebar .price-amount {
        font-size: 1.15rem;
    }
    .quote-sidebar .sidebar-actions-group {
        flex: 1 1 100%;
        flex-direction: row;
        gap: 8px;
        margin-top: 0;
    }
    .quote-sidebar .continue-btn,
    .quote-sidebar .back-action-btn {
        padding: 11px 14px;
        font-size: 13px;
    }
    .steps-container {
        width: 100%;
        max-width: 100%;
        margin: 20px auto 12px;
        padding: 0 8px;
        gap: 6px;
        box-sizing: border-box;
        overflow: hidden;
    }
    .step {
        gap: 6px;
        min-width: 0;
        flex-shrink: 1;
    }
    .step-divider {
        margin: 0 6px;
        min-width: 12px;
        flex: 1 1 12px;
    }
    .step-label {
        font-size: 11px;
        white-space: nowrap;
    }
}

@media (max-width: 480px) {
    .step-label {
        display: none;
    }
    .steps-container {
        padding: 0 4px;
    }
    .book-a-job-page .card-grid {
        grid-template-columns: 1fr;
    }
}

.quote-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 13px;
    color: var(--text-primary);
}

/* Total Price section cleanly featured at the top */
.quote-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 0;
    border-bottom: none;
}

@media (max-width: 991px) {
    .quote-total-row {
        width: 100%;
        margin-bottom: 0;
    }
}

.price-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    display: block;
    margin-bottom: 2px;
}

.price-amount {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* Item breakdown with clean bottom divider line */
.quote-breakdown {
    display: flex;
    flex-direction: column;
    border-bottom: 1px dashed var(--border);
    padding-bottom: 8px;
    margin-bottom: 4px;
}

@media (max-width: 991px) {
    .quote-breakdown {
        display: none; 
    }
}

/* Sidebar Navigation Controls Group */
.sidebar-actions-group {
    display: flex;
    flex-direction: column-reverse;
    gap: 12px;
    width: 100%;
    margin-top: 24px;
}

@media (max-width: 991px) {
    .sidebar-actions-group {
        flex-direction: row;
        margin-top: 0;
    }
}

.continue-btn {
    width: 100%;
    background: var(--primary);
    color: var(--white);
    border: none;
    padding: 14px 24px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    white-space: nowrap;
    text-align: center;
}

.continue-btn:hover {
    background: var(--primary-hovers);
}

.continue-btn:disabled {
    background: var(--border);
    color: var(--text-muted);
    cursor: not-allowed;
}

.back-action-btn {
    width: 100%;
    background: var(--text-primary);
    color: var(--white);
    border: none;
    padding: 14px 24px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    white-space: nowrap;
    text-align: center;
}

.back-action-btn:hover {
    background: #1f2937;
}

/* --- Interactive Mapping Infrastructure Overlay Modal --- */
.map-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(17, 24, 39, 0.7);
    display: none;
    z-index: 2000;
}

.map-modal-content {
    width: 90%;
    max-width: 900px;
    height: 80vh;
    margin: 10vh auto;
    background: var(--white);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.map-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
}

.map-modal-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 2px 0;
}

.map-modal-header p {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0;
}

.close-map-btn {
    background: var(--primary);
    color: var(--white);
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.close-map-btn:hover {
    background: var(--primary-hovers);
}

.map-search-bar-container {
    display: flex;
    gap: 10px;
    padding: 12px 24px;
    background: var(--bg-accent);
    border-bottom: 1px solid var(--border);
}

.map-search-bar-container input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid var(--text-light);
    border-radius: 6px;
    font-size: 14px;
    outline: none;
}

.map-search-bar-container input:focus {
    border-color: var(--primary);
}

.search-action-btn {
    background: var(--white);
    border: 1px solid var(--text-light);
    color: var(--text-primary);
    padding: 10px 18px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
}

.search-action-btn:hover {
    background: var(--border);
}

#map-render-zone {
    flex: 1;
    width: 100%;
}

.map-stats-bar {
    padding: 16px 24px;
    background: var(--white);
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.stat-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-accent);
    border: 1px solid var(--border);
    padding: 6px 14px;
    border-radius: 6px;
}

.map-reset-btn {
    background: var(--white);
    border: 1px solid var(--border);
    color: #b91c1c;
    padding: 8px 14px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
    flex-shrink: 0;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.map-reset-btn:hover {
    background: #fef2f2;
    border-color: #f3d0d0;
}

.badge-label {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

.badge-value {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary);
}

/* --- Step 3 Layout Custom Overrides --- */
.section-uppercase-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #9ca3af;
    margin: 0 0 12px 0;
}

/* Summary Table Structure */
.summary-table-card {
    background-color: var(--bg-light);
    border-radius: 8px;
    padding: 8px 16px;
    display: flex;
    flex-direction: column;
}
.summary-table-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #f1f0ec;
    font-size: 14px;
}
.summary-table-row:last-child {
    border-bottom: none;
}
.summary-label {
    color: #6b7280;
}
.summary-value {
    font-weight: 500;
    color: var(--black);
}

/* Blue Quote Card Layout */
.blue-breakdown-card {
    background-color: #f0f4ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    padding: 20px 24px;
}
.blue-card-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #3b82f6;
    margin: 0 0 16px 0;
}
.blue-breakdown-row {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: #374151;
    margin-bottom: 10px;
}
.blue-breakdown-divider {
    height: 1px;
    background-color: #3b82f6;
    margin: 16px 0;
}
.blue-total-row {
    display: flex;
    justify-content: space-between;
    font-size: 16px;
    font-weight: 700;
    color: #1d4ed8;
}

/* Action Controls Buttons */
.btn-confirm-black {
    background: #111827;
    color: #ffffff;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}
.btn-confirm-black:hover {
    background: #1f2937;
}
.btn-back-white {
    background: #ffffff;
    color: #4b5563;
    border: 1px solid #d1d5db;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease;
}
.btn-back-white:hover {
    background: #f9fafb;
}

/* Success View UI Elements */
.success-icon-circle {
    width: 56px;
    height: 56px;
    background-color: #e6f4ea;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.review-address-input {
    width: 100%;
    display: block;
    margin-top: 8px;
    border: 1px solid var(--bg-accent);
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 14px;
    font-family: 'DM Sans', sans-serif;
    color: var(--text-primary);
    background: var(--white);
    transition: .15s ease;
}

.review-address-input:hover {
    border-color: var(--border);
}

.review-address-input:focus {
    border-color: var(--accent2);
    box-shadow: 0 0 0 3px rgba(74, 128, 232, .12);
}

/* Address confirmation map (review step) */
.address-confirm-map-wrap {
    margin-top: 12px;
}
.address-confirm-map {
    width: 100%;
    height: 220px;
    border-radius: 10px;
    border: 1px solid var(--border, #e5e7eb);
    background: #eef2f7;
    overflow: hidden;
}
.address-confirm-hint {
    margin: 8px 0 0;
    font-size: 12px;
    color: #6b7280;
    line-height: 1.4;
}
.address-confirm-hint.is-error { color: #dc2626; }
.address-confirm-hint.is-ok { color: #16a34a; }

/* Google Places dropdown above review cards */
.pac-container {
    z-index: 3000 !important;
    font-family: 'DM Sans', sans-serif;
}

.travel-status {
    margin-top: 10px;
    font-size: 13px;
    font-weight: 500;
    color: #6b7280;
    transition: .2s;
}

.travel-status.loading {
    color: var(--primary);
}

.travel-status.success {
    color: #16a34a;
}

.travel-status.error {
    color: #dc2626;
}
