/* ===============================================
   HyperPlumb V2 - Combined Mobile-Optimized Stylesheet
   Merges V2 base styles with enhanced modal/messaging features
   UPDATED: Message Panel Redesign - Compact Under Map
   =============================================== */

/* ===============================================
   ROOT VARIABLES & THEME
   =============================================== */
:root {
    /* Brand Colors */
    --primary-color: #00152a;
    --secondary-color: #03defe;
    --accent-color: #007bff;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --info-color: #17a2b8;
    /* Neutral Colors */
    --white: #ffffff;
    --light-gray: #f8f9fa;
    --medium-gray: #6c757d;
    --dark-gray: #343a40;
    --black: #000000;
    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 3rem;
    /* Border Radius */
    --border-radius-sm: 4px;
    --border-radius-md: 8px;
    --border-radius-lg: 12px;
    /* Box Shadows */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.12);
    --shadow-md: 0 2px 4px rgba(0,0,0,0.16);
    --shadow-lg: 0 8px 25px rgba(0,0,0,0.15);
}

/* ===============================================
   BASE STYLES
   =============================================== */
html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
    height: 100%;
}

body {
    background: var(--light-gray);
    color: var(--dark-gray);
    line-height: 1.6;
}

/* ===============================================
                    HOME
   =============================================== */

.home-header {
    text-align: center;
    padding: 1.5rem 1rem;
    border-top: 2px solid var(--dark-gray);
    border-bottom: 2px solid var(--dark-gray);
    margin-bottom: 1.5rem;
}

    .home-header h1 {
        font-size: 2.5rem;
        margin: 0;
        color: var(--primary-color);
        font-weight: bold;
    }

    .home-header p {
        font-size: 1rem;
        margin: 0.5rem 0 0 0;
    }

.home-service-card {
    display: block;
    text-decoration: none;
    color: inherit;
    margin-bottom: 1rem;
    -webkit-tap-highlight-color: transparent;
}

    .home-service-card .card {
        cursor: pointer;
        min-height: 120px;
        display: flex;
        align-items: center;
        transition: all 0.2s ease;
    }

    .home-service-card .card-body {
        text-align: center;
        padding: 2rem 1.5rem;
        width: 100%;
    }

        .home-service-card .card-body h2 {
            margin-bottom: 0.5rem;
            font-size: 1.75rem;
            font-weight: 600;
        }

        .home-service-card .card-body p {
            margin: 0;
            font-size: 1.1rem;
            color: var(--medium-gray);
        }

/* ============================================
   ON-CALL TOGGLE STYLES
   Add to StatusBar styles or app.css
   ============================================ */

/* Toggle switch - the label wrapper */
.oncall-toggle {
    position: relative;
    display: inline-block;
    width: 36px;
    height: 20px;
    cursor: pointer;
}

    /* Hide default checkbox */
    .oncall-toggle input {
        opacity: 0;
        width: 0;
        height: 0;
    }

/* The slider background */
.oncall-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 20px;
}

    /* The slider circle */
    .oncall-slider:before {
        position: absolute;
        content: "";
        height: 14px;
        width: 14px;
        left: 3px;
        bottom: 3px;
        background-color: white;
        transition: 0.3s;
        border-radius: 50%;
        box-shadow: 0 1px 3px rgba(0,0,0,0.3);
    }

/* Checked state - green background */
.oncall-toggle input:checked + .oncall-slider {
    background-color: #22c55e;
}

    /* Checked state - move circle right */
    .oncall-toggle input:checked + .oncall-slider:before {
        transform: translateX(16px);
    }

/* Status text next to toggle */
.oncall-text {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.oncall-active {
    color: #22c55e;
}

.oncall-inactive {
    color: #999;
}

/* Dark mode adjustments */
.dark-mode .oncall-slider {
    background-color: #555;
}

.dark-mode .oncall-toggle input:checked + .oncall-slider {
    background-color: #22c55e;
}

.dark-mode .oncall-inactive {
    color: #888;
}


/* ===============================================
   BOTTOM NAV OVERRIDES (Technician Workflow)
   =============================================== */
.fixed-bottom.navbar {
    padding-bottom: env(safe-area-inset-bottom, 8px);
}

.fixed-bottom .btn-link {
    min-width: 60px;
    border-radius: 8px;
    transition: background-color 0.15s ease;
}

    .fixed-bottom .btn-link:hover,
    .fixed-bottom .btn-link:focus {
        background-color: rgba(0,0,0,0.05);
    }

    .fixed-bottom .btn-link:active {
        background-color: rgba(0,0,0,0.1);
    }

    .fixed-bottom .btn-link:disabled {
        opacity: 0.4;
    }

/* Larger screens */
@media (min-width: 769px) {
    .home-header h1 {
        font-size: 3rem;
    }

    .home-header p {
        font-size: 1.2rem;
    }

    .home-service-card .card-body h2 {
        font-size: 2rem;
    }
}

/* Emergency card styling */
.home-card-emergency {
    border-left: 4px solid var(--danger-color);
}

    .home-card-emergency h2 {
        color: var(--danger-color);
    }

/* Technician card styling */
.home-card-technician {
    border-left: 4px solid var(--success-color);
}

    .home-card-technician h2 {
        color: var(--success-color);
    }

/* Active/Touch state for mobile */
.home-service-card:active .card {
    transform: scale(0.98);
    box-shadow: var(--shadow-sm);
}

/* Desktop hover effects (when available) */
@media (hover: hover) {
    .home-service-card:hover .card {
        transform: translateY(-2px);
        box-shadow: var(--shadow-lg);
    }
}


/* ===============================================
   LAYOUT COMPONENTS
   =============================================== */
.container-fluid {
    padding-right: 1rem;
    padding-left: 1rem;
    margin-right: auto;
    margin-left: auto;
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -1rem;
    margin-left: -1rem;
}

.col-12 {
    flex: 0 0 100%;
    max-width: 100%;
    padding-right: 1rem;
    padding-left: 1rem;
}

.col-md-3 {
    flex: 0 0 25%;
    max-width: 25%;
    padding-right: 1rem;
    padding-left: 1rem;
}

.col-md-4 {
    flex: 0 0 33.33333%;
    max-width: 33.33333%;
    padding-right: 1rem;
    padding-left: 1rem;
}

.col-md-6 {
    flex: 0 0 50%;
    max-width: 50%;
    padding-right: 1rem;
    padding-left: 1rem;
}

.col-md-8 {
    flex: 0 0 66.66667%;
    max-width: 66.66667%;
    padding-right: 1rem;
    padding-left: 1rem;
}

/* ===============================================
   CARD COMPONENTS
   =============================================== */
.card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    word-wrap: break-word;
    background: var(--white);
    background-clip: border-box;
    border: 1px solid rgba(0,0,0,0.125);
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-sm);
    margin-bottom: 1rem;
}

.card-header {
    padding: 1.25rem 1.5rem;
    margin-bottom: 0;
    background: rgba(0,0,0,0.03);
    border-bottom: 1px solid rgba(0,0,0,0.125);
    border-radius: var(--border-radius-md) var(--border-radius-md) 0 0;
    font-weight: 600;
}

.card-body {
    flex: 1 1 auto;
    padding: 1.5rem;
}

.card-footer {
    padding: 1.25rem 1.5rem;
    background: rgba(0,0,0,0.03);
    border-top: 1px solid rgba(0,0,0,0.125);
    border-radius: 0 0 var(--border-radius-md) var(--border-radius-md);
}

/* ===============================================
   FORM STYLES
   =============================================== */
.form-control {
    display: block;
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: var(--dark-gray);
    background: var(--white);
    background-clip: padding-box;
    border: 1px solid #ced4da;
    border-radius: var(--border-radius-md);
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

    .form-control:focus {
        color: var(--dark-gray);
        background: var(--white);
        border-color: #80bdff;
        outline: 0;
        box-shadow: 0 0 0 0.25rem rgba(0, 123, 255, 0.25);
    }

.form-label {
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--dark-gray);
}

.form-select {
    display: block;
    width: 100%;
    padding: 0.75rem 2.25rem 0.75rem 0.75rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: var(--dark-gray);
    background: var(--white) url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e") no-repeat right 0.75rem center/16px 12px;
    border: 1px solid #ced4da;
    border-radius: var(--border-radius-md);
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

/* ===============================================
   BUTTON STYLES
   =============================================== */
.btn {
    display: inline-block;
    font-weight: 500;
    line-height: 1.5;
    color: #212529;
    text-align: center;
    text-decoration: none;
    vertical-align: middle;
    cursor: pointer;
    user-select: none;
    background-color: transparent;
    border: 2px solid transparent;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    border-radius: var(--border-radius-md);
    transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

    .btn:hover {
        color: #212529;
        text-decoration: none;
    }

    .btn:focus {
        outline: 0;
        box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
    }

.btn-primary {
    color: #fff;
    background: var(--accent-color);
    border-color: var(--accent-color);
    box-shadow: var(--shadow-sm);
}

    .btn-primary:hover {
        color: #fff;
        background: #0056b3;
        border-color: #004085;
    }

.btn-secondary {
    color: #fff;
    background: var(--medium-gray);
    border-color: var(--medium-gray);
    box-shadow: var(--shadow-sm);
}

.btn-success {
    color: #fff;
    background: var(--success-color);
    border-color: var(--success-color);
    box-shadow: var(--shadow-sm);
}

.btn-danger {
    color: #fff;
    background: var(--danger-color);
    border-color: var(--danger-color);
    box-shadow: var(--shadow-sm);
}

.btn-warning {
    color: #000;
    background: var(--warning-color);
    border-color: var(--warning-color);
    box-shadow: var(--shadow-sm);
}

.btn-info {
    color: #fff;
    background: var(--info-color);
    border-color: var(--info-color);
    box-shadow: var(--shadow-sm);
}

.btn-sm {
    padding: 0.35rem 0.75rem;
    font-size: 0.875rem;
    border-radius: var(--border-radius-sm);
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1.125rem;
    border-radius: var(--border-radius-lg);
}

.btn:disabled, .btn.disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ===============================================
   MAP CONTAINER STYLES
   =============================================== */
#map-container {
    width: 100%;
    height: 400px;
    border-radius: var(--border-radius-md);
    border: 1px solid #dee2e6;
    background: var(--light-gray);
    position: relative;
    overflow: hidden;
    overflow-y: auto;
}

    #map-container.blurred {
        filter: blur(4px) brightness(0.7);
        transition: filter 0.3s ease;
    }

.map-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    background: var(--light-gray);
    color: var(--medium-gray);
    font-size: 1.1rem;
}

.map-overlay {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(255, 255, 255, 0.95);
    padding: 0.75rem;
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-md);
    z-index: 1000;
}

/* ===============================================
   ENHANCED MODAL STYLES (From Reference)
   =============================================== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1050;
    display: none;
    width: 100%;
    height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.5);
}

    .modal.show {
        display: flex;
        align-items: center;
        justify-content: center;
    }

.modal-dialog {
    position: relative;
    width: auto;
    margin: 1rem;
    max-width: 500px;
    pointer-events: none;
}

.modal-content {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    pointer-events: auto;
    background: var(--white);
    background-clip: padding-box;
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    outline: 0;
}

.modal-header {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #dee2e6;
    border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
    background: var(--primary-color);
    color: white;
}

.modal-title {
    margin-bottom: 0;
    line-height: 1.5;
    font-weight: 600;
    font-size: 1.2rem;
}

.modal-body {
    position: relative;
    flex: 1 1 auto;
    padding: 1.5rem;
}

.modal-footer {
    display: flex;
    flex-wrap: wrap;
    flex-shrink: 0;
    align-items: center;
    justify-content: flex-end;
    padding: 1rem 1.5rem;
    border-top: 1px solid #dee2e6;
    border-radius: 0 0 var(--border-radius-lg) var(--border-radius-lg);
    gap: 0.5rem;
}

.close {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
    color: white;
    text-shadow: none;
    opacity: 0.7;
    cursor: pointer;
}

    .close:hover {
        opacity: 1;
    }

/* ===============================================
   ENHANCED MESSAGING SYSTEM
   =============================================== */

/* Floating Message Button */
.floating-message-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1050;
    animation: pulse 2s infinite;
}

    .floating-message-btn .btn {
        width: 60px;
        height: 60px;
        border-radius: 50%;
        border: none;
        background: var(--accent-color);
        box-shadow: var(--shadow-md);
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.2rem;
        position: relative;
        color: white;
    }

        .floating-message-btn .btn:hover {
            background: #0056b3;
            transform: scale(1.05);
        }

    .floating-message-btn .unread-badge {
        position: absolute;
        top: -5px;
        right: -5px;
        background: var(--danger-color);
        color: white;
        border-radius: 50%;
        width: 24px;
        height: 24px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 0.75rem;
        font-weight: bold;
        border: 2px solid white;
        animation: bounce 0.6s ease-in-out;
    }

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 123, 255, 0.7);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(0, 123, 255, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(0, 123, 255, 0);
    }
}

@keyframes bounce {
    0%, 20%, 60%, 100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-10px);
    }

    80% {
        transform: translateY(-5px);
    }
}

@keyframes pulse-1 {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.7;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Messaging Modal - Mobile Optimized */
.messaging-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1060;
    align-items: flex-end;
    justify-content: center;
}

    .messaging-modal.show {
        display: flex;
    }

.messaging-modal-content {
    background: white;
    width: 100%;
    max-width: 500px;
    height: 70vh;
    max-height: 600px;
    border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease-out;
    margin: 0;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Message Header */
.message-header {
    background: var(--primary-color);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-sm);
}

    .message-header h5 {
        margin: 0;
        font-weight: 600;
        font-size: 1.1rem;
    }

.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s;
}

    .close-btn:hover {
        background-color: rgba(255, 255, 255, 0.1);
    }

/* Messages Container */
.messages-container {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    background: #f8f9fa;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Message Input Area */
.message-input-area {
    padding: 1rem;
    background: white;
    border-top: 1px solid #e9ecef;
    display: flex;
    gap: 0.5rem;
    align-items: flex-end;
}

.message-input {
    flex: 1;
    border: 1px solid #ced4da;
    border-radius: 20px;
    padding: 0.75rem 1rem;
    resize: none;
    max-height: 120px;
    min-height: 44px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.15s ease-in-out;
}

    .message-input:focus {
        outline: none;
        border-color: var(--accent-color);
        box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
    }

.send-btn {
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: var(--shadow-sm);
}

    .send-btn:hover {
        background: #0056b3;
        transform: scale(1.05);
    }

    .send-btn:disabled {
        background: var(--medium-gray);
        cursor: not-allowed;
        transform: none;
    }

/* ===============================================
   ALERTS & NOTIFICATIONS
   =============================================== */
.alert {
    position: relative;
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    border-radius: var(--border-radius-md);
}

.alert-success {
    color: #155724;
    background: #d4edda;
    border-color: var(--success-color);
}

.alert-warning {
    color: #856404;
    background: #fff3cd;
    border-color: var(--warning-color);
}

.alert-danger {
    color: #721c24;
    background: #f8d7da;
    border-color: var(--danger-color);
}

.alert-info {
    color: #0c5460;
    background: #d1ecf1;
    border-color: var(--info-color);
}

/* ===============================================
   CONNECTION STATUS INDICATOR
   =============================================== */
.connection-status {
    position: fixed;
    top: 10px;
    right: 10px;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius-sm);
    font-weight: 500;
    text-align: center;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    border: 2px solid;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 140px;
    z-index: 1000;
}

    .connection-status.connected {
        background: #d4edda;
        color: #155724;
        border-color: #c3e6cb;
    }

    .connection-status.disconnected {
        background: #f8d7da;
        color: #721c24;
        border-color: #f5c6cb;
    }

/* ===============================================
   UTILITY CLASSES
   =============================================== */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.text-primary {
    color: var(--accent-color) !important;
}

.text-success {
    color: var(--success-color) !important;
}

.text-warning {
    color: var(--warning-color) !important;
}

.text-danger {
    color: var(--danger-color) !important;
}

.text-info {
    color: var(--info-color) !important;
}

.text-muted {
    color: var(--medium-gray) !important;
}

.bg-primary {
    background-color: var(--accent-color) !important;
}

.bg-success {
    background-color: var(--success-color) !important;
}

.bg-warning {
    background-color: var(--warning-color) !important;
}

.bg-danger {
    background-color: var(--danger-color) !important;
}

.bg-info {
    background-color: var(--info-color) !important;
}

.d-none {
    display: none !important;
}

.d-block {
    display: block !important;
}

.d-flex {
    display: flex !important;
}

.justify-content-center {
    justify-content: center !important;
}

.justify-content-between {
    justify-content: space-between !important;
}

.align-items-center {
    align-items: center !important;
}

.m-0 {
    margin: 0 !important;
}

.mt-2 {
    margin-top: 0.5rem !important;
}

.mt-3 {
    margin-top: 1rem !important;
}

.mb-2 {
    margin-bottom: 0.5rem !important;
}

.mb-3 {
    margin-bottom: 1rem !important;
}

.p-0 {
    padding: 0 !important;
}

.p-2 {
    padding: 0.5rem !important;
}

.p-3 {
    padding: 1rem !important;
}

/* ===============================================
   SPINNER/LOADING
   =============================================== */
.spinner-border {
    display: inline-block;
    width: 2rem;
    height: 2rem;
    vertical-align: -0.125em;
    border: 0.25em solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spinner-border 0.75s linear infinite;
}

.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.2em;
}

@keyframes spinner-border {
    to {
        transform: rotate(360deg);
    }
}

/* ===============================================
   ERROR BOUNDARY
   =============================================== */
.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

/* ===============================================
    CONFIRMATION
   =============================================== */

.shake-modal {
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}


/* Technician marker breathing animation */
@keyframes breathe {
    0%, 100% {
        transform: translateX(-50%) scale(1);
        opacity: 1;
    }

    50% {
        transform: translateX(-50%) scale(1.08);
        opacity: 0.85;
    }
}

.proceed-breathing {
    animation: breathe 2.5s ease-in-out infinite;
}

.proceed-tech-btn:hover.proceed-breathing {
    animation-play-state: paused;
    background-color: #0056b3;
}

.proceed-tech-btn:active {
    transform: translateX(-50%) scale(0.95);
    background-color: #004080;
}

/* After payment - messaging mode */
.proceed-tech-btn.payment-mode {
    animation: none;
    background-color: #28a745;
}

    .proceed-tech-btn.payment-mode:hover {
        background-color: #218838;
    }


/* Success pulse animation for payment confirmation */
.success-pulse {
    animation: successPulse 1s ease-in-out;
}

@keyframes successPulse {
    0%, 100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

.service-request-confirmation {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: var(--border-radius-md);
    margin: 1rem;
    box-shadow: var(--shadow-sm);
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.confirmation-header {
    background: var(--success-color);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius-md) var(--border-radius-md) 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

    .confirmation-header h4 {
        margin: 0;
        font-size: 1.1rem;
    }

.status-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.25rem 0.75rem;
    border-radius: var(--border-radius-sm);
    font-size: 0.85rem;
    font-weight: 500;
}

.confirmation-details {
    padding: 1.5rem;
}

.detail-item {
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

    .detail-item:last-child {
        margin-bottom: 0;
    }

    .detail-item strong {
        color: var(--dark-gray);
        display: inline-block;
        min-width: 80px;
    }

/* ===============================================
   RESPONSIVE DESIGN
   =============================================== */
@media (max-width: 768px) {
    .container-fluid {
        padding-right: 0.5rem;
        padding-left: 0.5rem;
    }

    .row {
        margin-right: -0.5rem;
        margin-left: -0.5rem;
    }

    .col-12, .col-md-3, .col-md-4, .col-md-6, .col-md-8 {
        padding-right: 0.5rem;
        padding-left: 0.5rem;
        flex: 0 0 100%;
        max-width: 100%;
    }

    .card {
        margin: 0.5rem 0;
    }

    .card-header, .card-body, .card-footer {
        padding: 0.75rem 1rem;
    }

    .modal-dialog {
        margin: 0.5rem;
        max-width: none;
    }

    .messaging-modal-content {
        height: 85vh;
        border-radius: var(--border-radius-md) var(--border-radius-md) 0 0;
    }

    #map-container {
        height: 300px;
    }

    .floating-message-btn {
        bottom: 15px;
        right: 15px;
    }

        .floating-message-btn .btn {
            width: 55px;
            height: 55px;
        }

    .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 1.125rem;
    }
}

/* Desktop Enhancements for Messaging */
@media (min-width: 769px) {
    .messaging-modal {
        align-items: center;
        justify-content: center;
    }

    .messaging-modal-content {
        max-width: 600px;
        height: 600px;
        border-radius: var(--border-radius-lg);
        margin: 2rem;
        animation: fadeInScale 0.3s ease-out;
    }

    @keyframes fadeInScale {
        from {
            transform: scale(0.9);
            opacity: 0;
        }

        to {
            transform: scale(1);
            opacity: 1;
        }
    }

    .floating-message-btn .btn:hover {
        transform: scale(1.1);
    }

    .col-md-3 {
        flex: 0 0 25%;
        max-width: 25%;
    }

    .col-md-4 {
        flex: 0 0 33.33333%;
        max-width: 33.33333%;
    }

    .col-md-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }

    .col-md-8 {
        flex: 0 0 66.66667%;
        max-width: 66.66667%;
    }
}

/* ================================================
               Markers
   ================================================ */

.service-request-bubble {
    position: relative;
    background: #fff;
    border: 2px solid #007bff;
    border-radius: 8px;
    padding: 8px 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    min-width: 120px;
    text-align: center;
    cursor: pointer;
}

.bubble-content {
    color: #333;
    font-size: 12px;
    line-height: 1.2;
}

.request-number {
    font-weight: bold;
    color: #007bff;
    margin-bottom: 2px;
}

.request-details {
    color: #666;
    margin-bottom: 2px;
}

.request-priority {
    color: #dc3545;
    font-size: 10px;
    font-weight: bold;
}

.bubble-pointer {
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid #007bff;
}

.service-request-bubble:hover {
    background: #f8f9fa;
    border-color: #0056b3;
}


/* ===============================================
   ACCESSIBILITY IMPROVEMENTS
   =============================================== */
.btn:focus,
.form-control:focus,
.form-select:focus {
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

@media (prefers-contrast: high) {
    .card {
        border: 2px solid var(--dark-gray);
    }

    .btn {
        border-width: 2px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .spinner-border,
    .messaging-modal-content,
    .floating-message-btn .btn {
        animation: none !important;
        transition: none !important;
    }
}


/* ===============================================
   CUSTOMER ENTRY PAGE - STATUS BAR & REDESIGN
   Added: [Current Date]
   Purpose: Rideshare-style UI with status bar
   NO CONFLICTS: All new classes, extends existing
   =============================================== */

/* -----------------------------------------------
   STATUS BAR - Persistent Top Bar
   ----------------------------------------------- */
.status-bar {
    position: fixed;
    top: 65px;
    left: 0;
    right: 0;
    z-index: 1040; /* Below modals (1050) but above map */
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.status-bar-content {
    display: flex;
    align-items: stretch; /* Changed from center */
    justify-content: space-between;
    padding: 12px 16px;
    min-height: 60px;
    gap: 12px;
}

.priority-strip {
    height: 3px;
    width: 100%;
    transition: background-color 0.3s ease;
}

/* Status Bar Sections */
.status-section {
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-left {
    flex: 0 0 auto;
    min-width: 120px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    justify-content: center;
}

.status-center {
    flex: 1 1 auto;
    justify-content: center;
    text-align: center;
}

.status-right {
    flex: 0 0 auto;
    min-width: 120px;
    justify-content: flex-end;
}

/* Status Bar Text */
.service-number {
    font-weight: 600;
    font-size: 14px;
    color: #1a1a1a;
    line-height: 1.2;
}

.service-type {
    font-size: 12px;
    color: #666;
    line-height: 1.2;
}

.status-icon {
    font-size: 24px;
    line-height: 1;
}

.status-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.status-primary {
    font-weight: 600;
    font-size: 15px;
    color: #1a1a1a;
    line-height: 1.2;
}

.status-secondary {
    font-size: 12px;
    color: #666;
    line-height: 1.2;
}

/* Technician Info in Status Bar */
.tech-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.tech-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    flex-shrink: 0;
}

.tech-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.tech-name {
    font-weight: 500;
    font-size: 13px;
    color: #1a1a1a;
    line-height: 1.2;
}

.tech-eta {
    font-size: 12px;
    color: #666;
    line-height: 1.2;
}

/* Finding Technician State */
.finding-tech {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #666;
}

/* Proceed Button - Shows when technician assigned, awaiting payment */
.proceed-button {
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: 700;
    font-size: 15px;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.4);
    animation: pulse-proceed 1.5s ease-in-out infinite;
    cursor: pointer;
    border: 2px solid #fff;
}

.proceed-icon {
    font-size: 20px;
    font-weight: bold;
    animation: arrow-bounce 1s ease-in-out infinite;
}

.proceed-text {
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

@keyframes pulse-proceed {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 4px 12px rgba(40, 167, 69, 0.4);
    }

    50% {
        transform: scale(1.08);
        box-shadow: 0 6px 16px rgba(40, 167, 69, 0.6);
    }
}

@keyframes arrow-bounce {
    0%, 100% {
        transform: translateX(0);
    }

    50% {
        transform: translateX(4px);
    }
}

.status-bar-clickable:hover .proceed-button {
    background: linear-gradient(135deg, #218838 0%, #1ea87a 100%);
    transform: scale(1.05);
}

/* Small Spinner for Status Bar (different from existing .spinner-border) */
.spinner-small {
    width: 16px;
    height: 16px;
    border: 2px solid #e9ecef;
    border-top-color: #007bff;
    border-radius: 50%;
    animation: spin-small 0.8s linear infinite;
}

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

/* Status Bar State Variations */
.status-bar.status-open {
    background: #fff9f0;
}

    .status-bar.status-open .status-icon {
        animation: pulse-status 2s ease-in-out infinite;
    }

@keyframes pulse-status {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.7;
        transform: scale(1.1);
    }
}

.status-bar.status-accepted,
.status-bar.status-assigned {
    background: #f0f9ff;
}

.status-bar.status-progress {
    background: #f0fff4;
}

.status-bar.status-completed {
    background: #f0fdf4;
}

    .status-bar.status-completed .status-primary {
        color: #16a34a;
    }

.status-bar.status-cancelled {
    background: #fef2f2;
}

    .status-bar.status-cancelled .status-primary {
        color: #dc2626;
    }

/* Clickable State - When technician assigned, awaiting payment */
.status-bar-clickable {
    cursor: pointer;
    transition: all 0.2s ease;
}

    .status-bar-clickable:hover {
        background: #e8f4ff !important;
        box-shadow: 0 3px 12px rgba(0, 123, 255, 0.2);
    }

    .status-bar-clickable:active {
        transform: scale(0.99);
    }

    .status-bar-clickable .status-primary {
        color: #0066cc;
    }

    .status-bar-clickable .status-secondary {
        color: #0066cc;
        font-weight: 600;
    }

    /* Add pointer cursor and pulse animation to clickable subtext */
    .status-bar-clickable .status-secondary {
        animation: pulse-click 2s ease-in-out infinite;
    }

@keyframes pulse-click {
    0%, 100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

/* -----------------------------------------------
   CUSTOMER ENTRY PAGE - Container
   EXTENDS existing, doesn't replace
   ----------------------------------------------- */
.customer-entry-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    overflow-y: auto;
    transition: padding-top 0.3s ease;
}

/* Map Variations - EXTENDS existing #map-container */
#map-container.map-with-statusbar {
    /* Inherits base #map-container styles, adds nothing */
}

#map-container.map-fullscreen-entry {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 0;
}

.address-input-full-width {
    width: 100%;
    background: white;
    padding: 1rem 0;
    border-bottom: 2px solid #e9ecef;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
    position: sticky;
    top: 63px; /* Below status bar */
    z-index: 999;
}

    .address-input-full-width input {
        border-radius: 50px;
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
        border: 2px solid #dee2e6;
    }

        .address-input-full-width input:focus {
            border-color: var(--primary-color);
            box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
            outline: none;
        }

@media (max-width: 768px) {
    .address-input-full-width {
        padding: 0.75rem 0;
    }

        .address-input-full-width input {
            font-size: 0.9rem;
            padding: 0.6rem 1.25rem;
        }

    .status-bar-content {
        padding: 10px 12px;
        min-height: 56px;
        gap: 8px;
        align-items: stretch; /* Ensure consistency on mobile */
    }

    /* Show service type on mobile - it's important! */
    .service-type {
        display: block;
        font-size: 11px;
        color: #666;
        line-height: 1.2;
    }

    .status-left {
        min-width: 80px;
        display: flex;
        flex-direction: column;
        gap: 2px;
        justify-content: center;
    }

    .status-primary {
        font-size: 14px;
    }

    .status-secondary {
        font-size: 11px;
    }

    .service-number {
        font-size: 13px;
    }

    .tech-avatar {
        width: 36px;
        height: 36px;
        font-size: 13px;
    }

    .tech-name {
        font-size: 12px;
    }

    .tech-eta {
        font-size: 11px;
    }

    .status-right {
        min-width: 100px;
    }

    /* Mobile viewport height */
    .customer-entry-container {
        height: 100dvh; /* Dynamic viewport height for mobile */
    }
}

@media (max-width: 480px) {
    .status-bar-content {
        padding: 8px 10px;
        min-height: 52px;
        align-items: stretch; /* Ensure consistency on small mobile */
    }

    /* Show subtext on small screens - it's critical for user guidance! */
    .status-secondary {
        display: block;
        font-size: 10px;
    }

    .tech-details {
        gap: 1px;
    }
}

/* -----------------------------------------------
   ACCESSIBILITY
   ----------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    .status-bar,
    .status-icon,
    .spinner-small {
        animation: none !important;
        transition: none !important;
    }
}

@media (prefers-contrast: high) {
    .status-bar {
        border-bottom: 2px solid #000;
    }

    .priority-strip {
        height: 4px;
    }
}

/* ===============================================
   END OF STATUS BAR ADDITIONS
   =============================================== */

/* ===============================================
   SLIDE NOTIFICATION COMPONENT
   Added to complete the notification system
   =============================================== */

/* Slide Notification Container */
.slide-notification {
    position: fixed;
    top: 80px; /* Below status bar */
    right: -400px; /* Start off-screen */
    width: 350px;
    max-width: 90vw;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    transition: right 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    overflow: hidden;
}

    /* Slide in animation */
    .slide-notification.show {
        right: 20px;
    }

/* Color bar at top */
.slide-notification-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e9ecef;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
}

.slide-notification-icon-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.slide-notification-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.slide-notification-title {
    font-weight: 700;
    font-size: 16px;
    color: #1a1a1a;
    margin: 0;
    line-height: 1.3;
}

.slide-notification-close {
    background: none;
    border: none;
    font-size: 24px;
    line-height: 1;
    color: #6c757d;
    cursor: pointer;
    padding: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
    flex-shrink: 0;
}

    .slide-notification-close:hover {
        background: #f8f9fa;
        color: #1a1a1a;
    }

/* Body content */
.slide-notification-body {
    padding: 1.25rem;
}

.slide-notification-message {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
    margin: 0 0 1rem 0;
}

/* Details section */
.slide-notification-details {
    background: #f8f9fa;
    padding: 0.75rem;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 1rem;
}

.notification-detail-item {
    display: flex;
    justify-content: space-between;
    padding: 0.25rem 0;
}

.notification-detail-label {
    color: #6c757d;
    font-weight: 500;
}

.notification-detail-value {
    color: #1a1a1a;
    font-weight: 600;
}

/* Action buttons */
.slide-notification-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.slide-notification-btn {
    flex: 1;
    padding: 0.65rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.slide-notification-btn-primary {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
}

    .slide-notification-btn-primary:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
    }

.slide-notification-btn-secondary {
    background: #f8f9fa;
    color: #495057;
    border: 1px solid #dee2e6;
}

    .slide-notification-btn-secondary:hover {
        background: #e9ecef;
    }

/* Progress bar for auto-dismiss */
.slide-notification-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #007bff 0%, #0056b3 100%);
    width: 100%;
    transform-origin: left;
    animation: progress-shrink 5s linear forwards;
}

@keyframes progress-shrink {
    from {
        transform: scaleX(1);
    }

    to {
        transform: scaleX(0);
    }
}

/* Pause animation on hover */
.slide-notification:hover .slide-notification-progress {
    animation-play-state: paused;
}

/* Color variants for different notification types */
.slide-notification.notification-success .slide-notification-icon {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
}

.slide-notification.notification-success .slide-notification-progress {
    background: linear-gradient(90deg, #28a745 0%, #20c997 100%);
}

.slide-notification.notification-info .slide-notification-icon {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    color: white;
}

.slide-notification.notification-info .slide-notification-progress {
    background: linear-gradient(90deg, #17a2b8 0%, #138496 100%);
}

.slide-notification.notification-warning .slide-notification-icon {
    background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%);
    color: white;
}

.slide-notification.notification-warning .slide-notification-progress {
    background: linear-gradient(90deg, #ffc107 0%, #ff9800 100%);
}

.slide-notification.notification-danger .slide-notification-icon {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
}

.slide-notification.notification-danger .slide-notification-progress {
    background: linear-gradient(90deg, #dc3545 0%, #c82333 100%);
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .slide-notification {
        top: 60px; /* Closer to top on mobile */
        width: 320px;
        right: -350px;
    }

        .slide-notification.show {
            right: 10px;
        }

    .slide-notification-header {
        padding: 0.875rem 1rem;
    }

    .slide-notification-body {
        padding: 1rem;
    }

    .slide-notification-title {
        font-size: 15px;
    }

    .slide-notification-message {
        font-size: 13px;
    }

    .slide-notification-btn {
        padding: 0.6rem 0.875rem;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .slide-notification {
        width: calc(100vw - 20px);
        right: -100vw;
    }

        .slide-notification.show {
            right: 10px;
        }

    .slide-notification-actions {
        flex-direction: column;
        gap: 0.5rem;
    }

    .slide-notification-btn {
        width: 100%;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .slide-notification {
        transition: none;
    }

    .slide-notification-progress {
        animation: none;
    }
}

/* ===============================================
   END OF SLIDE NOTIFICATION CSS
   =============================================== */

/* ============================================
   MESSAGE PANEL - COMPACT REDESIGN
   NEW: Replaces old .message-panel styles
   Position: Under map, above action buttons
   ============================================ */

.message-panel-compact {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin: 12px 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

    /* Panel Header */
    .message-panel-compact .panel-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 12px 16px;
        cursor: pointer;
        user-select: none;
        border-bottom: 1px solid transparent;
        transition: background-color 0.2s ease;
        -webkit-tap-highlight-color: rgba(0, 123, 255, 0.1);
    }

        .message-panel-compact .panel-header:hover {
            background-color: #f8f9fa;
        }

        .message-panel-compact .panel-header:active {
            background-color: #e9ecef;
        }

    .message-panel-compact.expanded .panel-header {
        border-bottom-color: #f0f0f0;
    }

    .message-panel-compact .header-content {
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .message-panel-compact .icon {
        font-size: 18px;
        line-height: 1;
    }

    .message-panel-compact .title {
        font-weight: 600;
        font-size: 15px;
        color: #333;
        line-height: 1;
    }

    .message-panel-compact .unread-badge {
        background: linear-gradient(135deg, #ff4444 0%, #cc0000 100%);
        color: white;
        border-radius: 10px;
        padding: 2px 7px;
        font-size: 11px;
        font-weight: 600;
        line-height: 1;
        animation: pulse-badge 2s ease-in-out infinite;
    }

@keyframes pulse-badge {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.05);
        opacity: 0.9;
    }
}

.message-panel-compact .connection-status {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-left: 4px;
    flex-shrink: 0;
}

    .message-panel-compact .connection-status.bg-success {
        background: #28a745;
        box-shadow: 0 0 4px rgba(40, 167, 69, 0.5);
    }

    .message-panel-compact .connection-status.bg-warning {
        background: #ffc107;
        animation: pulse-warning 1.5s ease-in-out infinite;
    }

@keyframes pulse-warning {
    0%, 100% {
        opacity: 1;
    }

    50% {
        opacity: 0.6;
    }
}

.message-panel-compact .connection-status.bg-danger {
    background: #dc3545;
}

.message-panel-compact .toggle-icon {
    color: #666;
    font-size: 14px;
    transition: transform 0.3s ease;
    line-height: 1;
}

.message-panel-compact.expanded .toggle-icon {
    transform: rotate(180deg);
}

/* Quick Input Row (Collapsed State) */
.message-panel-compact .quick-input-row {
    display: flex;
    gap: 8px;
    padding: 0 16px 12px 16px;
    animation: fadeIn 0.3s ease;
}

/* Last Message Preview (replaces input when showing last message) */
.message-panel-compact .last-message-preview {
    flex: 1;
    background: #e9ecef; /* Darker gray - "display mode" */
    border: 1px solid #dee2e6;
    border-radius: 20px;
    padding: 8px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    overflow: hidden;
    transition: all 0.2s ease;
}

    .message-panel-compact .last-message-preview:hover {
        background: #dee2e6; /* Slightly darker on hover */
        border-color: var(--accent-color);
    }

    .message-panel-compact .last-message-preview:active {
        background: #ced4da;
    }

.message-panel-compact .preview-label {
    font-weight: 600;
    color: #495057; /* Darker for better contrast */
    font-size: 13px;
    flex-shrink: 0;
}

.message-panel-compact .preview-text {
    flex: 1;
    color: #212529; /* Darker text for readability */
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message-panel-compact .quick-input {
    flex: 1;
    border: 1px solid #ddd;
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 14px;
    outline: none;
    transition: all 0.2s ease;
    background: white;
}

    .message-panel-compact .quick-input:focus {
        border-color: var(--accent-color);
        box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
    }

    .message-panel-compact .quick-input:disabled {
        background: #f5f5f5;
        cursor: not-allowed;
    }

    .message-panel-compact .quick-input::placeholder {
        color: #999;
        font-size: 13px;
    }

/* Send Button */
.message-panel-compact .send-btn {
    min-width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

    .message-panel-compact .send-btn.inactive {
        background: #e0e0e0;
        color: #999;
        cursor: not-allowed;
    }

    .message-panel-compact .send-btn.active {
        background: linear-gradient(135deg, var(--accent-color) 0%, #0056b3 100%);
        color: white;
        box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
    }

        .message-panel-compact .send-btn.active:hover {
            background: linear-gradient(135deg, #0056b3 0%, #004085 100%);
            transform: scale(1.05);
            box-shadow: 0 4px 12px rgba(0, 123, 255, 0.4);
        }

        .message-panel-compact .send-btn.active:active {
            transform: scale(0.95);
        }

    .message-panel-compact .send-btn:disabled {
        cursor: not-allowed;
        transform: none !important;
    }

    .message-panel-compact .send-btn .spinner {
        width: 16px;
        height: 16px;
        border: 2px solid rgba(255, 255, 255, 0.3);
        border-top-color: white;
        border-radius: 50%;
        animation: spinner-border 0.8s linear infinite;
    }

/* Panel Body (Expanded State) */
.message-panel-compact .panel-body {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.message-panel-compact.expanded .panel-body {
    max-height: 250px;
    opacity: 1;
}

/* Messages Scroll Area */
.message-panel-compact .messages-scroll {
    max-height: 150px;
    overflow-y: auto;
    padding: 12px 16px;
    background: #f8f9fa;
    scroll-behavior: smooth;
}

/* Message Bubbles */
.message-panel-compact .message-bubble {
    margin-bottom: 8px;
    max-width: 75%;
    animation: slideInMessage 0.3s ease;
    clear: both;
    display: flex;
    flex-direction: column;
}

@keyframes slideInMessage {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message-panel-compact .message-bubble.customer-message {
    margin-left: auto;
    align-items: flex-end;
}

.message-panel-compact .message-bubble.tech-message {
    margin-right: auto;
    align-items: flex-start;
}

.message-panel-compact .bubble-content {
    padding: 8px 12px;
    border-radius: 16px;
    word-wrap: break-word;
    font-size: 14px;
    line-height: 1.4;
    max-width: 100%;
}

.message-panel-compact .message-bubble.customer-message .bubble-content {
    background: linear-gradient(135deg, var(--accent-color) 0%, #0056b3 100%);
    color: white;
    border-bottom-right-radius: 4px;
}

.message-panel-compact .message-bubble.tech-message .bubble-content {
    background: #e9ecef;
    color: #333;
    border-bottom-left-radius: 4px;
    border: 1px solid #dee2e6;
}

.message-panel-compact .bubble-meta {
    display: flex;
    gap: 8px;
    font-size: 11px;
    color: #999;
    margin-top: 2px;
    padding: 0 4px;
}

    .message-panel-compact .bubble-meta .sender {
        font-weight: 500;
    }

    .message-panel-compact .bubble-meta .time {
        opacity: 0.8;
    }

/* Expanded Input Row */
.message-panel-compact .expanded-input-row {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid #f0f0f0;
    background: white;
}

.message-panel-compact .expanded-input {
    flex: 1;
    border: 1px solid #ddd;
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 14px;
    outline: none;
    transition: all 0.2s ease;
}

    .message-panel-compact .expanded-input:focus {
        border-color: var(--accent-color);
        box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
    }

    .message-panel-compact .expanded-input::placeholder {
        color: #999;
    }

/* Loading State */
.message-panel-compact .loading-state {
    text-align: center;
    padding: 24px;
    color: #999;
}

    .message-panel-compact .loading-state .spinner {
        width: 24px;
        height: 24px;
        border: 3px solid #f0f0f0;
        border-top-color: var(--accent-color);
        border-radius: 50%;
        animation: spinner-border 0.8s linear infinite;
        margin: 0 auto 8px;
    }

/* Empty State */
.message-panel-compact .empty-state {
    text-align: center;
    padding: 32px 24px;
    color: #999;
}

.message-panel-compact .empty-icon {
    font-size: 36px;
    display: block;
    margin-bottom: 8px;
    opacity: 0.5;
}

.message-panel-compact .empty-state p {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
}

/* Alert Banners */
.message-panel-compact .error-alert,
.message-panel-compact .info-banner,
.message-panel-compact .warning-banner {
    padding: 8px 12px;
    margin: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.message-panel-compact .error-alert {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.message-panel-compact .info-banner {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.message-panel-compact .warning-banner {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.message-panel-compact .close-btn {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: inherit;
    opacity: 0.7;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    flex-shrink: 0;
}

    .message-panel-compact .close-btn:hover {
        opacity: 1;
        background: rgba(0, 0, 0, 0.05);
    }

/* Scrollbar Styling */
.message-panel-compact .messages-scroll::-webkit-scrollbar {
    width: 6px;
}

.message-panel-compact .messages-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.message-panel-compact .messages-scroll::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

    .message-panel-compact .messages-scroll::-webkit-scrollbar-thumb:hover {
        background: #999;
    }

/* Mobile Optimization */
@media (max-width: 576px) {
    .message-panel-compact {
        margin: 8px 12px;
        border-radius: 10px;
    }

        .message-panel-compact .message-bubble {
            max-width: 85%;
        }

        .message-panel-compact .panel-header {
            padding: 10px 14px;
        }

        .message-panel-compact .quick-input-row,
        .message-panel-compact .expanded-input-row {
            padding: 0 14px 10px 14px;
        }

        .message-panel-compact .quick-input,
        .message-panel-compact .expanded-input {
            font-size: 13px;
            padding: 7px 14px;
        }

        .message-panel-compact .send-btn {
            min-width: 36px;
            height: 36px;
            font-size: 16px;
        }

        .message-panel-compact.expanded .panel-body {
            max-height: 300px;
        }

        .message-panel-compact .messages-scroll {
            max-height: 200px;
        }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .message-panel-compact,
    .message-panel-compact .panel-body,
    .message-panel-compact .message-bubble,
    .message-panel-compact .quick-input-row,
    .message-panel-compact .send-btn {
        animation: none !important;
        transition: none !important;
    }

        .message-panel-compact .unread-badge {
            animation: none;
        }
}

@media (prefers-contrast: high) {
    .message-panel-compact {
        border: 2px solid #000;
    }

        .message-panel-compact .message-bubble.tech-message .bubble-content {
            border: 2px solid #000;
        }

        .message-panel-compact .quick-input,
        .message-panel-compact .expanded-input {
            border: 2px solid #000;
        }
}

/* Predefined Status Messages Grid */
.message-panel-compact .predefined-messages-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 12px;
    max-height: 280px;
    overflow-y: auto;
    border-top: 1px solid #e0e0e0;
}

.message-panel-compact .predefined-msg-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    text-align: left;
    font-size: 13px;
    transition: all 0.15s ease;
}

    .message-panel-compact .predefined-msg-btn:hover {
        background: #f0f7ff;
        border-color: #0d6efd;
    }

    .message-panel-compact .predefined-msg-btn:active {
        background: #d4e8ff;
        transform: scale(0.97);
    }

    .message-panel-compact .predefined-msg-btn:disabled {
        opacity: 0.5;
        cursor: not-allowed;
    }

    .message-panel-compact .predefined-msg-btn.status {
        border-left: 3px solid #0d6efd;
    }

    .message-panel-compact .predefined-msg-btn.info {
        border-left: 3px solid #ffc107;
    }

    .message-panel-compact .predefined-msg-btn.request {
        border-left: 3px solid #198754;
    }

.message-panel-compact .predefined-icon {
    font-size: 18px;
    flex-shrink: 0;
}

.message-panel-compact .predefined-text {
    font-size: 13px;
    line-height: 1.3;
    color: #333;
}

/* Mobile adjustments for predefined grid */
@media (max-width: 400px) {
    .message-panel-compact .predefined-messages-grid {
        grid-template-columns: 1fr;
        gap: 6px;
        padding: 8px;
    }

    .message-panel-compact .predefined-msg-btn {
        padding: 8px 10px;
        font-size: 12px;
    }
}

/* ============================================
   END OF MESSAGE PANEL COMPACT STYLES
   ============================================ */

/* ============================================
   TECHNICIAN NAVIGATION - MINIMAL ADDITIONS
   Uses existing Bootstrap .btn-primary classes
   ============================================ */

/* Navigation Label - Small header */
.navigation-label {
    font-size: 14px;
    font-weight: 600;
    color: #495057;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

/* Three Button Grid Layout */
.navigation-buttons-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

    /* Button modifications - vertical layout with icon */
    .navigation-buttons-grid .btn {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 8px;
        min-height: 80px;
        padding: 12px 8px;
    }

        .navigation-buttons-grid .btn i {
            font-size: 24px;
        }

        .navigation-buttons-grid .btn .btn-label {
            font-size: 13px;
            font-weight: 500;
        }

/* Mobile - Keep 3 across */
@media (max-width: 768px) {
    .navigation-buttons-grid {
        gap: 8px;
    }

        .navigation-buttons-grid .btn {
            min-height: 75px;
            padding: 10px 6px;
        }

            .navigation-buttons-grid .btn i {
                font-size: 22px;
            }

            .navigation-buttons-grid .btn .btn-label {
                font-size: 12px;
            }
}

/* Very small screens - more compact */
@media (max-width: 360px) {
    .navigation-buttons-grid {
        gap: 6px;
    }

        .navigation-buttons-grid .btn {
            min-height: 70px;
            padding: 8px 4px;
        }

            .navigation-buttons-grid .btn i {
                font-size: 20px;
            }

            .navigation-buttons-grid .btn .btn-label {
                font-size: 11px;
            }

    .navigation-label {
        font-size: 13px;
    }
}


/* ===============================================
   GOOGLE MAPS INFOWINDOW CUSTOMIZATION
   Hide close button when InfoWindow is clickable
   =============================================== */
.gm-style-iw button[aria-label="Close"] {
    display: none !important;
}

/* Alternative - target by title attribute */
.gm-style-iw button[title="Close"] {
    display: none !important;
}

/* Ensure InfoWindow content has proper padding without close button */
.gm-style-iw-chr {
    padding-right: 0 !important;
}


/* ===============================================
   FIX: Customer Entry Page Alignment Issue
   =============================================== */

/* Remove grid system margins/padding that cause alignment issues */
.content-below-map .container {
    padding: 0;
    margin: 0;
}

.content-below-map .row {
    margin-right: 0;
    margin-left: 0;
}

.content-below-map .col-12,
.content-below-map .col-md-3,
.content-below-map .col-md-4,
.content-below-map .col-md-6,
.content-below-map .col-md-8 {
    padding-right: 0;
    padding-left: 0;
}

/* ===============================================
   FIX: Address Input & Autocomplete - Complete Solution
   =============================================== */

/* Wrapper gets the padding to create 90% width effect */
.address-input-full-width {
    width: 100%;
    /* NO padding here */
}

    /* Container handles horizontal padding - MUST be more specific than .content-below-map .container */
    .address-input-full-width > .container {
        padding: 0;
        margin: 0;
        max-width: 100%;
    }

/* Input wrapper is full width */
.address-input-wrapper {
    position: relative;
    width: 100%;
}

    /* Input field is full width */
    .address-input-wrapper input {
        width: 100%;
        padding-right: 50px; /* Space for loading spinner */
        box-sizing: border-box;
    }

/* YOUR custom address suggestions dropdown - match wrapper width */
.address-suggestions-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100%;
    background: white;
    border: 2px solid var(--accent-color);
    border-radius: var(--border-radius-lg);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    max-height: 320px;
    overflow-y: auto;
    z-index: 1001;
    box-sizing: border-box;
}

/* GOOGLE's autocomplete dropdown - force it to match the input position and width */
.pac-container {
    /* Calculate position: wrapper padding (5vw) + container offset */
    margin-left: 5vw !important;
    margin-right: 5vw !important;
    /* Force width to match available space */
    width: calc(90vw - 2rem) !important; /* 90vw minus container padding */
    max-width: calc(90vw - 2rem) !important;
    left: 0 !important;
    right: auto !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
}

/* Constrain pac-items to prevent overflow */
.pac-item {
    box-sizing: border-box !important;
    max-width: 100% !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

.pac-item-query {
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .address-input-full-width > .container {
        padding-left: 2.5vw !important;
        padding-right: 2.5vw !important;
    }

    .pac-container {
        margin-left: 2.5vw !important;
        margin-right: 2.5vw !important;
        width: calc(95vw - 1rem) !important;
        max-width: calc(95vw - 1rem) !important;
    }

    .address-suggestions-dropdown {
        max-height: 280px;
    }
}


/* ===============================================
   HOME PAGE DARK MODE SECTION - COPY THIS ENTIRE FILE
   Paste at END of your 2,200-line base CSS
   =============================================== */

/* -----------------------------------------------
   DARK MODE VARIABLES (extends :root)
   ----------------------------------------------- */
:root {
    /* Home Page Dark Mode Colors - Light Theme */
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --text-primary: #343a40;
    --text-secondary: #6c757d;
    --text-muted: #9ca3af;
    --border-color: #dee2e6;
    --card-bg: #ffffff;
    --card-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    /* Emergency Colors */
    --emergency-bg: #dc3545;
    --emergency-text: #ffffff;
    --emergency-cta: #ffffff;
    --emergency-cta-text: #dc3545;
    /* Accent Colors */
    --accent-blue: #0066CC;
    /* NEW Badge Colors */
    --badge-bg: #FFD700;
    --badge-text: #dc3545;
    --badge-border: #ffffff;
}

/* Dark Mode Colors */
body.dark-mode {
    --bg-primary: #1a1a1a;
    --bg-secondary: #2d2d2d;
    --text-primary: #e0e0e0;
    --text-secondary: #b0b0b0;
    --text-muted: #808080;
    --border-color: #404040;
    --card-bg: #2d2d2d;
    --card-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    --emergency-bg: #ff4444;
    --emergency-text: #ffffff;
    --emergency-cta: #ffffff;
    --emergency-cta-text: #ff4444;
    --accent-blue: #4d9fff;
    --badge-bg: #FFD700;
    --badge-text: #ff4444;
    --badge-border: #2d2d2d;
}

/* -----------------------------------------------
   HOME PAGE WRAPPER - SCOPED STYLES
   ----------------------------------------------- */

/* Smooth transitions - HOME PAGE ONLY */
.home-page-wrapper * {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.home-page-wrapper {
    min-height: 100vh;
    background-color: var(--bg-primary);
}

    .home-page-wrapper .card {
        background-color: var(--card-bg);
        border-color: var(--border-color);
        box-shadow: var(--card-shadow);
    }

    .home-page-wrapper .text-muted {
        color: var(--text-muted) !important;
    }

/* -----------------------------------------------
   HOME HEADER BAR
   ----------------------------------------------- */
.home-header-bar {
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 0.5rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.header-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

/* Dark Mode Toggle */
.dark-mode-toggle {
    background: none;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.25rem;
    transition: all 0.3s ease;
}

    .dark-mode-toggle:hover {
        transform: rotate(20deg) scale(1.1);
        border-color: var(--accent-blue);
    }

    .dark-mode-toggle:active {
        transform: rotate(20deg) scale(0.95);
    }

.moon-icon {
    display: none;
}

body.dark-mode .sun-icon {
    display: none;
}

body.dark-mode .moon-icon {
    display: inline;
}

/* Rapid Response Button */
.header-rapid-response {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--emergency-bg);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 24px;
    font-weight: 600;
    font-size: 0.875rem;
    text-decoration: none;
    border: 2px solid var(--emergency-bg);
    transition: all 0.3s ease;
    white-space: nowrap;
    min-height: 44px;
    animation: breathe 2.5s ease-in-out infinite;
}

    .header-rapid-response:hover {
        text-decoration: none;
        color: white;
        transform: scale(1.05);
        box-shadow: 0 4px 12px rgba(220, 53, 69, 0.4);
    }

    .header-rapid-response:active {
        transform: scale(0.98);
    }

body.dark-mode .header-rapid-response {
    background: var(--emergency-bg);
    border-color: var(--emergency-bg);
}

    body.dark-mode .header-rapid-response:hover {
        box-shadow: 0 4px 12px rgba(255, 68, 68, 0.5);
    }

.rapid-icon {
    font-size: 1rem;
    line-height: 1;
    animation: pulse-lightning 2.5s ease-in-out infinite;
}

/* Animations */
@keyframes breathe {
    0%, 100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.03);
    }
}

@keyframes pulse-lightning {
    0%, 100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

/* -----------------------------------------------
   HOME CONTENT LAYOUT
   ----------------------------------------------- */
.home-content {
    padding-top: 1rem;
    padding-bottom: 2rem;
}

.home-header-bar .home-header {
    margin: 0;
    padding: 0;
    border: none;
}

    .home-header-bar .home-header h1 {
        font-size: 1.75rem;
        margin: 0;
    }

    .home-header-bar .home-header p {
        font-size: 0.875rem;
        margin: 0;
    }

/* -----------------------------------------------
   SECTION LABELS
   ----------------------------------------------- */
.section-label {
    text-align: center;
    padding: 1.5rem 1rem 1rem 1rem;
}

    .section-label h3 {
        font-size: 1.5rem;
        font-weight: 600;
        color: var(--text-primary);
        margin: 0;
        text-transform: uppercase;
        letter-spacing: 1px;
    }

/* -----------------------------------------------
   SERVICE CARDS WITH ROUNDED CORNERS
   ----------------------------------------------- */
.service-card-enhanced {
    margin-bottom: 1.25rem;
}

    .service-card-enhanced .card {
        transition: all 0.3s ease;
        cursor: pointer;
        min-height: 140px;
        border: 1px solid var(--border-color);
        border-radius: 16px;
    }

    .service-card-enhanced:hover .card {
        transform: translateY(-6px);
        box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
        border-color: var(--accent-blue);
    }

body.dark-mode .service-card-enhanced:hover .card {
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.6);
}

.service-card-enhanced:active .card {
    transform: translateY(-2px);
}

.service-card-enhanced .card-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.5rem;
}

.service-icon {
    font-size: 2.5rem;
    line-height: 1;
    margin-bottom: 0.75rem;
    transition: transform 0.3s ease;
}

.bounce-hover:hover {
    animation: icon-bounce 0.6s ease;
}

@keyframes icon-bounce {
    0%, 100% {
        transform: translateY(0);
    }

    25% {
        transform: translateY(-8px);
    }

    50% {
        transform: translateY(-4px);
    }

    75% {
        transform: translateY(-6px);
    }
}

.service-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.service-description {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.4;
    margin: 0;
}

/* -----------------------------------------------
   NEW SERVICE ANNOUNCEMENT
   ----------------------------------------------- */
.new-service-announcement {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1.5rem 1rem;
    margin: 1rem 0;
    background: linear-gradient(90deg, transparent 0%, var(--bg-secondary) 20%, var(--bg-secondary) 80%, transparent 100%);
}

.announcement-icon {
    font-size: 1.5rem;
    line-height: 1;
    animation: pulse-icon 2s ease-in-out infinite;
}

@keyframes pulse-icon {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.7;
        transform: scale(1.2);
    }
}

.announcement-text {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* -----------------------------------------------
   EMERGENCY CARD
   ----------------------------------------------- */
.emergency-card-link {
    margin-bottom: 1.25rem;
    display: block;
    text-decoration: none;
    color: inherit;
}

    .emergency-card-link:hover {
        text-decoration: none;
        color: inherit;
    }

.emergency-card-enhanced {
    position: relative;
    background: var(--emergency-bg) !important;
    color: var(--emergency-text) !important;
    border: none !important;
    min-height: 280px;
    box-shadow: 0 8px 24px rgba(220, 53, 69, 0.3) !important;
    transition: all 0.3s ease;
    border-radius: 16px;
}

body.dark-mode .emergency-card-enhanced {
    box-shadow: 0 8px 24px rgba(255, 68, 68, 0.4) !important;
}

.emergency-card-link:hover .emergency-card-enhanced {
    transform: translateY(-6px);
    box-shadow: 0 12px 28px rgba(220, 53, 69, 0.4) !important;
}

body.dark-mode .emergency-card-link:hover .emergency-card-enhanced {
    box-shadow: 0 12px 28px rgba(255, 68, 68, 0.5) !important;
}

.emergency-card-link:active .emergency-card-enhanced {
    transform: translateY(-2px);
}

.emergency-card-enhanced .card-body {
    padding: 2rem 1.5rem !important;
    text-align: center;
}

/* NEW Badge */
.new-badge {
    position: absolute;
    top: -12px;
    right: 12px;
    background: var(--badge-bg);
    color: var(--badge-text);
    font-weight: 900;
    font-size: 0.85rem;
    padding: 8px 12px;
    border-radius: 50%;
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1.2;
    border: 3px solid var(--badge-border);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transform: rotate(-15deg);
    z-index: 10;
    animation: badge-wobble 3s ease-in-out infinite;
}

@keyframes badge-wobble {
    0%, 100% {
        transform: rotate(-15deg) scale(1);
    }

    25% {
        transform: rotate(-12deg) scale(1.03);
    }

    50% {
        transform: rotate(-18deg) scale(1);
    }

    75% {
        transform: rotate(-14deg) scale(1.03);
    }
}

body.dark-mode .new-badge {
    border-color: var(--badge-border);
}

/* Emergency Title */
.emergency-title {
    font-size: 2rem;
    font-weight: 900;
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.emergency-card-enhanced h2 {
    color: var(--emergency-text) !important;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.emergency-tagline {
    font-size: 1.125rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.emergency-description {
    color: rgba(255, 255, 255, 0.9) !important;
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 1.5rem;
}

/* Emergency CTA Button */
.emergency-cta-button {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--emergency-cta);
    color: var(--emergency-cta-text);
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.125rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.emergency-card-link:hover .emergency-cta-button {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.emergency-card-link:active .emergency-cta-button {
    transform: scale(0.98);
}

.cta-arrow {
    font-size: 1.5rem;
    line-height: 1;
    transition: transform 0.3s ease;
}

.emergency-card-link:hover .cta-arrow {
    transform: translateX(4px);
    animation: arrow-pulse 0.6s ease-in-out;
}

@keyframes arrow-pulse {
    0%, 100% {
        transform: translateX(4px);
    }

    50% {
        transform: translateX(8px);
    }
}

/* -----------------------------------------------
   TRUST BADGES SECTION
   ----------------------------------------------- */
.trust-section {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 2rem 1rem;
    background: var(--bg-secondary);
    border-radius: 16px;
    margin: 1.5rem 0;
}

.trust-badge {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
}

.badge-icon {
    width: 32px;
    height: 32px;
    background: var(--success-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.125rem;
    flex-shrink: 0;
}

.badge-text {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary);
}

/* -----------------------------------------------
   TECHNICIAN PORTAL CARD
   ----------------------------------------------- */
.tech-card-link {
    margin-bottom: 1.25rem;
    display: block;
    text-decoration: none;
    color: inherit;
}

    .tech-card-link:hover {
        text-decoration: none;
        color: inherit;
    }

.tech-portal-enhanced {
    background: linear-gradient(135deg, var(--accent-green) 0%, #20c997 100%) !important;
    color: white !important;
    border: none !important;
    min-height: 180px;
    transition: all 0.3s ease;
    border-radius: 16px;
}

body.dark-mode .tech-portal-enhanced {
    background: linear-gradient(135deg, var(--accent-green) 0%, #2dd284 100%) !important;
}

.tech-card-link:hover .tech-portal-enhanced {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(40, 167, 69, 0.3);
}

body.dark-mode .tech-card-link:hover .tech-portal-enhanced {
    box-shadow: 0 8px 20px rgba(61, 212, 111, 0.4);
}

.tech-card-link:active .tech-portal-enhanced {
    transform: translateY(-1px);
}

.tech-portal-enhanced .card-body {
    text-align: center;
    padding: 1.5rem !important;
}

.tech-icon {
    font-size: 3rem;
    line-height: 1;
    margin-bottom: 0.75rem;
}

.tech-portal-enhanced h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: white !important;
}

.tech-description {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: rgba(255, 255, 255, 0.95) !important;
}

.referral-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    margin-top: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.referral-icon {
    font-size: 1.25rem;
    line-height: 1;
}

.referral-text {
    font-size: 0.875rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
}

/* Technician Portal Buttons */
.tech-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin: 16px 0;
    flex-wrap: wrap;
}

.btn-tech-login {
    background: rgba(255, 255, 255, 0.95);
    color: #1a202c;
    padding: 14px 28px;
    border-radius: 8px;
    border: 2px solid rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    display: inline-flex;
    align-items: center;
}

    .btn-tech-login:hover {
        background: #ffffff;
        color: #1a202c;
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(0,0,0,0.25);
    }

.btn-tech-signup {
    background: rgba(0, 0, 0, 0.3);
    color: white;
    padding: 14px 28px;
    border-radius: 8px;
    border: 2px solid rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    display: inline-flex;
    align-items: center;
}

    .btn-tech-signup:hover {
        background: rgba(0, 0, 0, 0.5);
        color: white;
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    }

/* Dark mode adjustments for tech buttons */
body.dark-mode .btn-tech-login {
    background: rgba(255, 255, 255, 0.9);
    color: #1a202c;
    border-color: rgba(255, 255, 255, 0.9);
}

    body.dark-mode .btn-tech-login:hover {
        background: #ffffff;
        color: #000;
    }

body.dark-mode .btn-tech-signup {
    background: rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.9);
}

    body.dark-mode .btn-tech-signup:hover {
        background: rgba(0, 0, 0, 0.6);
    }

/* -----------------------------------------------
   MOBILE OPTIMIZATIONS
   ----------------------------------------------- */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 0.75rem;
        padding: 0.5rem 0;
    }

    .header-top-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }

    .header-rapid-response {
        width: 100%;
        justify-content: center;
        order: 3;
    }

    .emergency-card-enhanced {
        min-height: 260px;
    }

    .emergency-title {
        font-size: 1.75rem;
    }

    .emergency-card-enhanced h2 {
        font-size: 1.35rem;
    }

    .emergency-tagline {
        font-size: 1rem;
    }

    .emergency-cta-button {
        padding: 0.875rem 1.75rem;
        font-size: 1rem;
    }

    .service-icon {
        font-size: 2.25rem;
    }

    .service-title {
        font-size: 1.125rem;
    }

    .service-description {
        font-size: 0.875rem;
    }

    .section-label h3 {
        font-size: 1.25rem;
    }

    .dark-mode-toggle {
        width: 40px;
        height: 40px;
        font-size: 1.125rem;
    }

    .new-badge {
        width: 60px;
        height: 60px;
        font-size: 0.75rem;
        top: -10px;
        right: 10px;
    }

    .announcement-text {
        font-size: 0.875rem;
    }
}

@media (max-width: 375px) {
    .emergency-card-enhanced .card-body {
        padding: 1.5rem 1rem !important;
    }

    .emergency-title {
        font-size: 1.5rem;
    }

    .emergency-card-enhanced h2 {
        font-size: 1.25rem;
    }

    .emergency-cta-button {
        padding: 0.75rem 1.5rem;
        font-size: 0.95rem;
    }

    .new-badge {
        width: 55px;
        height: 55px;
        font-size: 0.7rem;
    }
}

/* -----------------------------------------------
   ACCESSIBILITY & REDUCED MOTION
   ----------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    .home-page-wrapper *,
    .home-page-wrapper *::before,
    .home-page-wrapper *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .bounce-hover:hover {
        animation: none;
    }

    .new-badge {
        animation: none;
    }

    .header-rapid-response {
        animation: none;
    }

    .rapid-icon {
        animation: none;
    }
}

/* -----------------------------------------------
   ENSURE TOUCH TARGETS ARE 44x44px MIN
   ----------------------------------------------- */
.dark-mode-toggle,
.emergency-cta-button,
.service-card-enhanced .card,
.emergency-card-enhanced {
    min-height: 44px;
}

/* -----------------------------------------------
   BOX-SIZING FOR HOME PAGE
   ----------------------------------------------- */
.home-page-wrapper *,
.home-page-wrapper *::before,
.home-page-wrapper *::after {
    box-sizing: border-box;
}

.home-page-wrapper .container-fluid {
    padding-left: 1rem;
    padding-right: 1rem;
}

.home-page-wrapper .row {
    margin-left: 0;
    margin-right: 0;
}

.home-page-wrapper .col-12 {
    padding-left: 0;
    padding-right: 0;
}

/* ===============================================
   END OF HOME PAGE DARK MODE SECTION
   =============================================== */

/* ===============================================
   ADDRESS INPUT - ALIGNMENT FIX (CRITICAL)
   Must use > child selector for higher specificity
   =============================================== */

/* Desktop: 5vw padding on container */
.address-input-full-width > .container {
    padding-left: 5vw !important;
    padding-right: 5vw !important;
    margin: 0;
    max-width: 100%;
}

/* Mobile: 2.5vw padding on container */
@media (max-width: 768px) {
    .address-input-full-width > .container {
        padding-left: 2.5vw !important;
        padding-right: 2.5vw !important;
    }
}

/* Loading spinner inside input */
.address-loading-spinner {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--accent-color, #007bff);
    font-size: 20px;
    pointer-events: none;
    z-index: 10;
}

/* Error message below input */
.address-error-message {
    margin-top: 12px;
    padding: 12px 16px;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-left: 4px solid #ffc107;
    border-radius: 8px;
    color: #856404;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.address-error-message i {
    color: #ffc107;
    font-size: 18px;
    flex-shrink: 0;
}

.address-error-message span {
    flex: 1;
}

.address-error-message .btn {
    flex-shrink: 0;
    white-space: nowrap;
}

/* Mobile adjustments for new elements */
@media (max-width: 768px) {
    .address-loading-spinner {
        right: 15px;
        font-size: 18px;
    }

    .address-error-message {
        font-size: 13px;
        padding: 10px 14px;
    }

        .address-error-message .btn {
            font-size: 12px;
            padding: 4px 12px;
        }
}

/* Disable input while geocoding */
input.address-input-field:disabled {
    background-color: #f5f5f5;
    cursor: wait;
}


/* ===============================================
   ANIMATED BORDER - CONIC GRADIENT
   Smooth cancel at top-right, uncancel at bottom-left
   For Service Request & Project Address Cards
   =============================================== */
.animated-border-conic {
    position: relative;
    border-radius: 12px;
    padding: 3px;
    overflow: hidden;
    background: #f8f9fa;
    margin-bottom: 1rem;
}

    /* First beam: clockwise */
    .animated-border-conic::before {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        width: 200%;
        height: 200%;
        background: conic-gradient( from 0deg, transparent 0deg, transparent 30deg, #007bff 50deg, #00d4ff 60deg, #007bff 70deg, transparent 90deg, transparent 360deg );
        transform-origin: center;
        animation: rotateClockwiseSmooth 5s linear infinite;
    }

    /* Second beam: counter-clockwise */
    .animated-border-conic::after {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        width: 200%;
        height: 200%;
        background: conic-gradient( from 0deg, transparent 0deg, transparent 30deg, #007bff 50deg, #00d4ff 60deg, #007bff 70deg, transparent 90deg, transparent 360deg );
        transform-origin: center;
        animation: rotateCounterClockwiseSmooth 5s linear infinite;
    }

/* Clockwise with smooth fade out and fade in */
@keyframes rotateClockwiseSmooth {
    0% {
        transform: translate(-50%, -50%) rotate(225deg);
        opacity: 1;
    }

    45% {
        transform: translate(-50%, -50%) rotate(387deg);
        opacity: 1;
    }

    50% {
        transform: translate(-50%, -50%) rotate(405deg);
        opacity: 0;
    }

    95% {
        transform: translate(-50%, -50%) rotate(567deg);
        opacity: 0;
    }

    100% {
        transform: translate(-50%, -50%) rotate(585deg);
        opacity: 1;
    }
}

/* Counter-clockwise with smooth fade out and fade in */
@keyframes rotateCounterClockwiseSmooth {
    0% {
        transform: translate(-50%, -50%) rotate(225deg);
        opacity: 1;
    }

    45% {
        transform: translate(-50%, -50%) rotate(63deg);
        opacity: 1;
    }

    50% {
        transform: translate(-50%, -50%) rotate(45deg);
        opacity: 0;
    }

    95% {
        transform: translate(-50%, -50%) rotate(-117deg);
        opacity: 0;
    }

    100% {
        transform: translate(-50%, -50%) rotate(-135deg);
        opacity: 1;
    }
}

/* Glow layer - must be added as child element */
.animated-border-glow {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 12px;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

    .animated-border-glow::before {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        width: 200%;
        height: 200%;
        background: conic-gradient( from 0deg, transparent 0deg, transparent 30deg, #007bff 50deg, #00d4ff 60deg, #007bff 70deg, transparent 90deg, transparent 360deg );
        transform-origin: center;
        animation: rotateClockwiseSmooth 5s linear infinite;
        filter: blur(12px);
    }

    .animated-border-glow::after {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        width: 200%;
        height: 200%;
        background: conic-gradient( from 0deg, transparent 0deg, transparent 30deg, #007bff 50deg, #00d4ff 60deg, #007bff 70deg, transparent 90deg, transparent 360deg );
        transform-origin: center;
        animation: rotateCounterClockwiseSmooth 5s linear infinite;
        filter: blur(12px);
    }

/* Inner card content */
.animated-border-conic .card-inner {
    position: relative;
    z-index: 1;
    background: white;
    border-radius: 10px;
    overflow: hidden;
}

    /* Remove default card margin when inside animated border */
    .animated-border-conic .card-inner .card {
        margin-bottom: 0;
        border: none;
    }

/* Accessibility - respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .animated-border-conic::before,
    .animated-border-conic::after,
    .animated-border-glow::before,
    .animated-border-glow::after {
        animation: none !important;
        opacity: 0.5;
    }
}

/* ===============================================
   IMAGE LIGHTBOX - Force viewport positioning
   =============================================== */
#lightbox-modal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    max-width: 100vw !important;
    max-height: 100vh !important;
    margin: 0 !important;
    padding: 0 !important;
    z-index: 999999 !important;
    transform: none !important;
    contain: layout style;
}

    /* Full screen image container */
    #lightbox-modal .lightbox-image-container {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        overflow: hidden !important;
        touch-action: none !important;
    }

/* Image fills the screen */
#lightbox-image {
    max-width: 100vw !important;
    max-height: 100vh !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    transform-origin: center center !important;
    transition: opacity 0.2s ease !important;
}

/* Header overlay - floating on top */
#lightbox-modal .lightbox-header {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 10 !important;
    background: linear-gradient(to bottom, rgba(0,0,0,0.7) 0%, transparent 100%) !important;
    padding: 1rem !important;
    padding-top: max(1rem, env(safe-area-inset-top)) !important;
    transition: opacity 0.3s ease !important;
}

/* Footer overlay - floating on bottom */
#lightbox-modal .lightbox-footer {
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 10 !important;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 100%) !important;
    padding: 1rem !important;
    padding-bottom: max(1rem, env(safe-area-inset-bottom)) !important;
    transition: opacity 0.3s ease !important;
}

/* Ensure body doesn't scroll when lightbox is open */
body.lightbox-open {
    overflow: hidden !important;
    position: fixed !important;
    width: 100% !important;
    height: 100% !important;
}


/* ===============================================
   SPRINT MANAGEMENT STYLES
   Used by: SprintManagementModal, TechSprintView
   =============================================== */

/* Sprint card with colored left border */
.sprint-card {
    border-left-width: 4px !important;
    border-left-style: solid !important;
}

/* Animated Sprint Card Wrapper - Shimmer Effect */
.sprint-card-animated-wrapper {
    position: relative;
    margin-bottom: 0.5rem;
}

    .sprint-card-animated-wrapper::before {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        width: 4px;
        height: 40px;
        background: linear-gradient(
            180deg,
            rgba(255, 255, 255, 0) 0%,
            rgba(255, 255, 255, 0.95) 50%,
            rgba(255, 255, 255, 0) 100%
        );
        animation: shimmerUpDown 2s ease-in-out infinite;
        z-index: 10;
        pointer-events: none;
        border-radius: 4px 0 0 4px;
    }

    .sprint-card-animated-wrapper .sprint-card-inner {
        background: white;
        border-radius: var(--border-radius-md);
        box-shadow: var(--shadow-sm);
        border-left: 4px solid;
    }

@keyframes shimmerUpDown {
    0% {
        top: -40px;
        opacity: 0;
    }
    15% {
        opacity: 1;
    }
    85% {
        opacity: 1;
    }
    100% {
        top: calc(100% + 0px);
        opacity: 0;
    }
}

/* Clickable elements */
.clickable {
    cursor: pointer;
}

/* Small text sizes */
.text-xs {
    font-size: 0.65rem;
}

.text-sm {
    font-size: 0.75rem;
}

.text-md {
    font-size: 0.85rem;
}

/* Badge size variants */
.badge-xs {
    font-size: 0.6rem;
    padding: 0.15rem 0.35rem;
}

.badge-sm {
    font-size: 0.7rem;
    padding: 0.2rem 0.4rem;
}

/* Progress bar variants */
.progress-xs {
    height: 4px;
    border-radius: 0;
}

.progress-sm {
    height: 6px;
}

.progress-thin {
    height: 4px;
}

/* Reorder buttons (up/down arrows) */
.reorder-btn {
    font-size: 0.7rem;
    padding: 0 0.25rem !important;
    line-height: 1;
}

.reorder-btn-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

/* Sprint color picker buttons */
.sprint-color-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    padding: 0;
    border: 2px solid transparent;
    transition: transform 0.15s ease, border-color 0.15s ease;
}

    .sprint-color-btn:hover {
        transform: scale(1.1);
    }

    .sprint-color-btn.selected {
        border-color: var(--dark-gray);
        border-width: 3px;
    }

/* Sprint panel columns (for admin modal) */
.sprint-panel {
    max-height: 70vh;
    overflow-y: auto;
}

/* Sprint header - clickable collapse trigger */
.sprint-header {
    cursor: pointer;
    transition: background-color 0.15s ease;
}

    .sprint-header:hover {
        background-color: rgba(0, 0, 0, 0.02);
    }

/* Sprint job item */
.sprint-job-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    transition: background-color 0.15s ease;
}

    .sprint-job-item:hover {
        background-color: rgba(0, 0, 0, 0.02);
    }

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

/* Priority number badge */
.priority-badge {
    min-width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 600;
}

/* Job info section */
.sprint-job-info {
    flex-grow: 1;
    min-width: 0; /* Allow text truncation */
}

.sprint-job-title {
    font-weight: 600;
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sprint-job-address {
    font-size: 0.75rem;
    color: var(--medium-gray);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Selected state for job checkboxes */
.sprint-job-selected {
    background-color: rgba(40, 167, 69, 0.1);
}

/* Management mode warning banner */
.management-mode-banner {
    background-color: rgba(255, 193, 7, 0.2);
    border-left: 4px solid var(--warning-color);
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

/* Code entry modal input */
.code-input {
    font-size: 1.5rem;
    letter-spacing: 0.5rem;
    text-align: center;
}

/* Sprint due date indicators */
.due-overdue {
    color: var(--danger-color);
    font-weight: 600;
}

.due-soon {
    color: var(--warning-color);
    font-weight: 500;
}

.due-normal {
    color: var(--medium-gray);
}

/* Empty state styling */
.sprint-empty-state {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--medium-gray);
}

    .sprint-empty-state i {
        font-size: 2rem;
        margin-bottom: 0.5rem;
        display: block;
    }

/* Action bar when jobs selected */
.sprint-action-bar {
    position: sticky;
    top: 0;
    z-index: 10;
    background-color: var(--success-color);
    color: white;
    padding: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Quick add button */
.quick-add-btn {
    opacity: 0.7;
    transition: opacity 0.15s ease;
}

    .quick-add-btn:hover {
        opacity: 1;
    }

/* Mobile optimizations for sprint view */
@media (max-width: 768px) {
    .sprint-panel {
        max-height: 50vh;
    }

    .sprint-job-item {
        padding: 0.75rem 0.5rem;
    }

    .reorder-btn {
        padding: 0.25rem 0.35rem !important;
    }

    .sprint-color-btn {
        width: 32px;
        height: 32px;
    }
}

/* Sprint Tab Navigation (Mobile-First) */
.sprint-tabs {
    display: flex;
    background: var(--primary-color);
    padding: 0;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

.sprint-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    padding: 0.75rem 0.5rem;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

    .sprint-tab:hover:not(:disabled) {
        color: white;
        background: rgba(255, 255, 255, 0.1);
    }

    .sprint-tab.active {
        color: white;
        background: rgba(255, 255, 255, 0.15);
    }

        .sprint-tab.active::after {
            content: '';
            position: absolute;
            bottom: -2px;
            left: 0;
            right: 0;
            height: 3px;
            background: white;
        }

    .sprint-tab:disabled {
        opacity: 0.4;
        cursor: not-allowed;
    }

    .sprint-tab .badge {
        font-size: 0.65rem;
        padding: 0.15rem 0.4rem;
    }

/* Selected Sprint Banner */
.sprint-selected-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 1rem;
    background: var(--primary-color);
    color: white;
    border-left: 4px solid;
    font-size: 0.9rem;
}

/* Sprint List Item (in Sprints tab) */
.sprint-list-item {
    padding: 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    cursor: pointer;
    transition: background-color 0.15s ease;
}

    .sprint-list-item:hover {
        background-color: rgba(0, 0, 0, 0.02);
    }

    .sprint-list-item.selected {
        background-color: rgba(0, 123, 255, 0.08);
    }

    .sprint-list-item:active {
        background-color: rgba(0, 0, 0, 0.05);
    }

/* Sprint List Item inside Animated Wrapper */
.sprint-card-animated-wrapper .sprint-list-item.sprint-card-inner {
    background: white;
    border-left: 4px solid;
}

/* Mobile: Hide tab text, show icons only */
@media (max-width: 480px) {
    .sprint-tab span:not(.badge) {
        display: none;
    }

    .sprint-tab i {
        font-size: 1.2rem;
    }

    .sprint-tab .badge {
        margin-left: 0;
    }
}

/* ===============================================
   RESPONSE TIME SELECTOR
   =============================================== */
.response-time-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.response-time-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--white);
}

.response-time-option:hover {
    border-color: var(--accent-color);
    background: #f0f7ff;
}

.response-time-option.selected {
    border-color: var(--accent-color);
    background: #e7f1ff;
    box-shadow: 0 0 0 1px var(--accent-color);
}

.response-time-label {
    font-weight: 600;
    font-size: 1rem;
    color: var(--primary-color);
}

.response-time-price {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--success-color);
}
