body, html {
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    margin: 0;
}


#content-wrapper-slim {
    max-width: 1300px;
    /*margin-left: 15px;*/
    /*margin-right: 10px;*/
    margin-left: auto;
    margin-right: auto;
}

.sidebar {
    width: 220px;
}

#page-content-id {
    width: 1000px;
}

.main-content {
    flex: 1;
    min-width: 0;
}


#sidebar-wrapper-id {
    margin-right: 3px;
}

@media (max-width: 991.98px) {
    #sidebar-wrapper-id {
        display: none;
    }
    .sidebar {
        display: none;
    }
}

nav {
    z-index: 9;
}

/* Main content area should grow to fill available space */
main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Firefox-compatible map height fix - replace existing CSS with this: */

/* Desktop: Set explicit height for content row */
.content-row {
    height: calc(100vh - 80px); /* Adjust 80px to your header height */
    overflow: hidden;
    margin: 0;
}

/* Desktop: Map column takes explicit height */
.map-column {
    height: calc(100vh - 80px); /* Same as content-row */
}

/* Desktop: Form column takes explicit height and allows scrolling */
.form-column {
    height: calc(100vh - 80px); /* Same as content-row */
    overflow-y: scroll;
    overflow-x: hidden;
    word-wrap: break-word;
    overflow-wrap: break-word;

}

/* Desktop: Map takes full height - explicit px height for Firefox */
#map {
    width: 100%;
    height: calc(100vh - 80px); /* Explicit height for Firefox */
    max-height: calc(100vh - 80px); /* Chrome/Safari */
    min-height: calc(100vh - 80px); /* Chrome/Safari */
    display: block; /* Ensure block display */
    position: absolute; /* Reliable cross-browser sizing */
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.map-column {
    position: relative; /* Creates positioning context */
}


/* Form content styling */
.form-content {
    padding: 0;
    min-height: 100%;
}

/* Mobile: Revert to scrollable behavior */
/* Add this to your existing mobile CSS section - replace the mobile rules */

/* Mobile: Fix map height and layout */
@media (max-width: 767px) {
    .content-row {
        height: auto !important; /* Allow natural height */
        overflow: visible !important; /* Allow scrolling */
        display: flex;
        flex-direction: column;
        align-items: stretch;
        flex: 1;
        min-height: 0;
    }

    .map-column {
        height: 60vh !important; /* Increase map height on mobile */
        display: flex;
        flex-direction: column;
        position: relative; /* Ensure positioning context */
    }

    .form-column {
        height: auto !important; /* Allow natural height */
        overflow-y: visible !important; /* Remove scroll restriction */
        display: flex;
        flex-direction: column;
        flex: 1; /* Take remaining space */
    }

    /* Map takes 60%vh height of its container on mobile */
    #map {
        position: absolute !important; /* Use absolute positioning */
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100% !important;
        height: 100% !important; /* Fill the entire map-column */
        flex: none;
        min-height: 60vh; /* Fallback */
        max-height: none !important; /* Remove height restrictions */
    }

    .form-content {
        flex: 1;
        overflow-y: visible; /* Allow natural scrolling */
        padding: 0;
        min-height: auto;
    }

    /* Ensure map container fills its space */
    .map-container {
        height: 100% !important;
        position: relative;
    }
}

/* Additional Firefox-specific fixes - desktop only */
@media (min-width: 768px) {
    .map-column, .form-column {
        flex: 0 0 50%; /* Don't grow/shrink, fixed 50% width */
        max-height: calc(100vh - 80px); /* Chrome/Safari */
        min-height: calc(100vh - 80px); /* Chrome/Safari */
    }

    @-moz-document url-prefix() {
        #map {
            height: calc(100vh - 80px) !important;
            min-height: calc(100vh - 80px) !important;
            max-height: calc(100vh - 80px) !important;
        }
    }
}

/* Footer stays at bottom */
.footer {
    margin-top: auto;
    flex-shrink: 0; /* Prevent footer from shrinking */
}


@media only screen and (max-width: 500px) {
    #index-footer-id {
        display: none;
    }
}

#coords {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 6px 12px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    font-size: 14px;
    border-radius: 4px;
    z-index: 1;
}

.area-label {
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    padding: 2px 6px;
    font-size: 13px;
    font-family: sans-serif;
    border-radius: 4px;
    pointer-events: none;
}

/* Chrome, Safari, Edge, Opera */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Firefox */
input[type=number] {
    -moz-appearance: textfield;
}

.chat-messages {
    display: flex;
    flex-direction: column;
    max-height: 800px;
    overflow-y: scroll
}

.chat-message-left,
.chat-message-right {
    display: flex;
    flex-shrink: 0
}

.chat-message-left {
    margin-right: auto
}

.chat-message-right {
    flex-direction: row-reverse;
    margin-left: auto
}

.chat-item {
    transition: all 0.2s ease-in-out;
    cursor: pointer;
}

.chat-item:hover {
    background-color: rgba(0, 0, 0, 0.05) !important;
}

.chat-item.bg-light {
    background-color: rgba(0, 0, 0, 0.05) !important;
}

.unread {
    background-color: #ebeced;
}


.hover-effect:hover {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.choice-box {
    cursor: pointer;
    border: 2px solid #dee2e6;
    transition: border-color 0.2s, background-color 0.2s;
}

.choice-box:hover {
    border-color: #575b5e;
}

.choice-box.selected {
    border: 2px solid #0d6efd;
    background-color: #e7f1ff;
}


/*!* Service and categories cards styling *!*/
.provider-avatar-card {
    width: 30px;
    height: 30px;
    object-fit: cover;
}

.service-image {
    height: 160px;
    object-fit: cover;
}

.service-card:hover {
    border-color: #198754;
    transform: translateY(-2px);
    transition: all 0.3s ease;
}

.category-card:hover {
    border-color: #198754;
    transform: translateY(-2px);
    transition: all 0.3s ease;
}

/* Booking code style */
.booking-code {
    font-family: monospace;
}

/* Custom success pagination styles */
.pagination-success .page-link {
    color: var(--bs-success);
// border-color: var(--bs-success-border-subtle, #dee2e6);
}

.pagination-success .page-link:hover {
    color: var(--bs-success-emphasis);
    background-color: var(--bs-success-bg-subtle);
// border-color: var(--bs-success-border-subtle);
}

.pagination-success .page-item.active .page-link {
    color: var(--bs-white);
    background-color: var(--bs-success);
    border-color: var(--bs-success);
}

.pagination-success .page-item.disabled .page-link {
    color: var(--bs-success-text-emphasis);
// background-color: var(--bs-success-bg-subtle);
// border-color: var(--bs-success-border-subtle);
}

/* Makes the offcanvas body act like a full-height flex column */
#notification-offcanvas-body {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden; /* Prevent scroll bleeding */
}

/* Fixed header area for buttons */
#notifications-header {
    padding: 1rem;
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    flex-shrink: 0;
}

/* Scrollable notification list */
#notifications-list-wrapper {
    flex-grow: 1;
    overflow-y: auto;
    padding-bottom: 1rem;
    max-height: calc(100vh - 180px);
}

/* Custom scrollbar styling for notifications list */
#notifications-list-wrapper::-webkit-scrollbar {
    width: 6px;
}

#notifications-list-wrapper::-webkit-scrollbar-track {
    background: #f1f1f1;
}

#notifications-list-wrapper::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

#notifications-list-wrapper::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* ========================================
   NOTIFICATION ITEMS STYLING
   Individual notification cards
   ======================================== */

/* Notification item base styles */
.notification-item {
    border-color: #e9ecef !important;
}

.notification-item:hover {
    background-color: #f8f9fa !important;
}

/* Unread notification styling */
.notification-item.unread {
    background-color: #f0f9f5;
    position: relative;
}

/* Green left border indicator for unread notifications */
.notification-item.unread::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background-color: #198754;
}

/* Ensure notification buttons stay compact */
.notification-item .btn-sm {
    line-height: 1.2;
}

/* Notification filter pills active state */
.btn-group .btn-success {
    font-weight: 600;
}

/* Notification badge styling */
.badge.rounded-pill {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25em 0.6em;
}

/* Area display styling - smaller version */
.area-display {
    color: white;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.area-value {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0;
}

.area-label {
    font-size: 0.875rem;
    opacity: 0.8;
    margin: 0.25rem 0 0 0;
}

/* ========================================
   FORM FOCUS STATES - GREEN THEME
   Override Bootstrap's default blue focus
   ======================================== */

/* Text inputs, textareas, and select dropdowns */
.form-control:focus,
.form-select:focus,
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="tel"]:focus,
input[type="url"]:focus,
input[type="search"]:focus,
input[type="date"]:focus,
input[type="datetime-local"]:focus,
input[type="time"]:focus,
textarea:focus {
    border-color: #198754 !important;
    box-shadow: 0 0 0 0.25rem rgba(25, 135, 84, 0.25) !important;
    outline: 0;
}

/* Select2 dropdown focus states */
.select2-container--bootstrap-5 .select2-selection--single:focus,
.select2-container--bootstrap-5.select2-container--focus .select2-selection,
.select2-container--bootstrap-5.select2-container--open .select2-selection {
    border-color: #198754 !important;
    box-shadow: 0 0 0 0.25rem rgba(25, 135, 84, 0.25) !important;
}

/* Select2 search field inside dropdown */
.select2-container--bootstrap-5 .select2-search__field:focus {
    border-color: #198754 !important;
    box-shadow: 0 0 0 0.25rem rgba(25, 135, 84, 0.25) !important;
    outline: 0;
}

/* Select2 hover state - lighter green */
.select2-container--bootstrap-5 .select2-results__option--highlighted {
    background-color: #d1e7dd !important;
    color: #0f5132 !important;
}

/* Select2 selected item - dark green */
.select2-container--bootstrap-5 .select2-results__option--selected {
    background-color: #198754 !important;
    color: white !important;
}

/* Select2 optgroup labels (category section headers) - darker and more prominent */
.select2-container--bootstrap-5 .select2-results__group {
    color: #212529 !important;
    font-weight: 600 !important;
    font-size: 0.9rem !important;
    padding: 8px 12px !important;
    margin-top: 4px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

/* Checkboxes and radio buttons */
.form-check-input:focus {
    border-color: #198754 !important;
    box-shadow: 0 0 0 0.25rem rgba(25, 135, 84, 0.25) !important;
}

.form-check-input:checked {
    background-color: #198754 !important;
    border-color: #198754 !important;
}

/* File input focus */
.form-control[type="file"]:focus {
    border-color: #198754 !important;
    box-shadow: 0 0 0 0.25rem rgba(25, 135, 84, 0.25) !important;
}

/* Input group addon focus (when input is focused) */
.input-group:focus-within .input-group-text {
    border-color: #198754;
}

/* Range slider */
input[type="range"]:focus {
    outline: none;
}

input[type="range"]:focus::-webkit-slider-thumb {
    box-shadow: 0 0 0 0.25rem rgba(25, 135, 84, 0.25);
}

input[type="range"]:focus::-moz-range-thumb {
    box-shadow: 0 0 0 0.25rem rgba(25, 135, 84, 0.25);
}

/* Fieldset styling */
fieldset {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

fieldset legend {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
    padding: 0 0.5rem;
    margin-bottom: 0;
    width: auto;
}

.bg-light fieldset {
    background: #f8f9fa;
    border-color: #dee2e6;
}

/* Area display - made smaller */
#area-value-id {
    font-size: 1.5rem !important;
    font-weight: 600;
    color: #198754;
    margin-bottom: 0.5rem;
}

/* Alert styling */
.alert-info {
    border-left: 4px solid #17a2b8;
    background: #f0f9ff;
    border-color: #bee5eb;
}

/* Material fields toggle */
#material-details {
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
    margin-top: 1rem;
}

/* Submit section styling */
.btn-outline-secondary {
    border-color: #6c757d;
    color: #6c757d;
}

.btn-outline-secondary:hover {
    background-color: #6c757d;
    border-color: #6c757d;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    fieldset {
        padding: 1rem;
    }

    .area-display {
        padding: 0.75rem;
        margin-bottom: 1rem;
    }

    .area-value {
        font-size: 1.5rem !important;
    }

    .area-label {
        font-size: 0.75rem;
    }
}

#coords {
    position: absolute;
    bottom: 10px;
    left: 10px;
    height: 30px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
}

/* Social links */
.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f8f9fa;
    color: #6c757d;
    text-decoration: none;
    transition: all 0.2s ease;
    margin-right: 0.5rem;
}

.social-links a:hover {
    background: #198754;
    color: white;
    transform: translateY(-2px);
}

/* Image gallery */

.service-image-gallery {
    height: 200px;
    object-fit: cover;
    border-radius: 5px;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.service-image-gallery:hover {
    opacity: 0.8;
}

/* My service and my profile service card action icons */

.service-actions {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.edit-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    opacity: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s ease;
}

.banner-section:hover .edit-overlay {
    opacity: 1;
}

.service-card:hover .service-actions {
    opacity: 1;
}

/* Image gallery action buttons */

.image-actions {
    opacity: 0;
    transition: opacity 0.2s ease;
}

.image-gallery-item:hover .image-actions {
    opacity: 1;
}

/* QR Code hover */

.qr-code-container {
    cursor: pointer;

}

/* Selection color */
::-moz-selection { /* Code for Firefox */
 color: white;
 background: #4c0bce;
}

::selection {
 color: white;
 background: #4c0bce;
}

/* HTMX Loading Indicators */
/* Hide indicators by default */
.htmx-indicator {
    display: none;
}

/* Show indicators when HTMX request is in progress */
.htmx-request .htmx-indicator,
.htmx-request.htmx-indicator {
    display: block;
}

/* Disable form interaction during HTMX requests */
.htmx-request form {
    opacity: 0.6;
    pointer-events: none;
}