.w-form-width {
    max-width: 1300px;
}

#id_person_prices-FORMS {
    display: flex;
    flex-wrap: wrap;
    gap: 10px
}

.dates-panel .w-panel__wrapper, .spots-panel .w-panel__wrapper {
    display: inline-block;
    width: 48%;
    margin-right: 2%;
}

.dates-panel .w-panel__wrapper:last-child, .spots-panel .w-panel__wrapper:last-child {
    margin-right: 0;
}

.spots-panel input {
    width: auto;
}

.checkbox-select-multiple {
    display: grid;
    grid-template-columns: auto auto auto;
}

.modal {
    display: none;
    position: fixed;
    top: 0%;
    left: 0%;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.model-column {
    padding: 10px;
    width: 750px;
}

.modal-content-custom {
    background: var(--w-bg-primary, white);
    color: var(--w-text-primary, black);;
    padding: 20px;
    width: max-content;
    margin: 10% auto;
    border-radius: 10px;
    display: block;
}

.close {
    float: right;
    cursor: pointer;
    color: var(--w-text-secondary, #333);;
}

.model-column div {
    padding: 10px;
}

.model-column input[type="checkbox"] {
    margin-bottom: 5px;
    vertical-align: middle;
    filter: var(--w-filter-invert, none);
}

.model-column select {
    font-size: 0.9rem;
    min-height: 1.5rem;
    background-position-y: 0.85rem, 0.85rem;
    margin-top: 3px;
    background-color: var(--w-bg-secondary, #f8f9fa); /* Light background in light mode */
    color: var(--w-text-primary, black);
    border: 1px solid var(--w-border-color, #ccc);
}

/* Ensure labels and text are readable */
.checkbox-group label, .dropdown-group label, .modal-content-custom h2 {
    font-weight: bold;
    color: var(--w-text-primary, black);
}

.modal-content-custom h2 {
    text-align: center;
}

.button-row {
    text-align: right;
    padding: 1rem 0 0.5rem 0;
}

/* Checkbox Row */
.checkbox-row {
    display: flex;
    justify-content: space-between; /* Spreads items evenly */
    margin-bottom: 20px; /* Space between rows */
}

.checkbox-group {
    flex: 1; /* Each group takes equal space */
    margin-right: 15px; /* Space between groups */
}

.checkbox-group:last-child {
    margin-right: 0; /* Remove margin from the last item */
}

/* Dropdown Row */
.dropdown-row {
    display: flex;
    justify-content: space-between; /* Spreads items evenly */
}

.dropdown-group {
    flex: 1; /* Each group takes equal space */
    margin-right: 15px; /* Space between groups */
}

.dropdown-group:last-child {
    margin-right: 0; /* Remove margin from the last item */
}

.dropdown-group select {
    width: 100%; /* Ensure dropdowns fill their container */
}

.w-header .right {
    margin-top: .85rem;
}

/* Base styles for the button */
.btn-outline-primary {
    /* Core button styles (from Bootstrap's .btn class) */
    display: inline-block;
    font-weight: 400;
    line-height: 1.5;
    text-align: center;
    text-decoration: none;
    vertical-align: middle;
    cursor: pointer;
    user-select: none;
    padding: 0.375rem 0.75rem; /* Default padding */
    font-size: 1rem; /* Default font size */
    border-radius: 0.375rem; /* Default border-radius in Bootstrap 5 */
    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;

    /* Outline-specific styles */
    color: var(--w-color-text-button); /* Primary color for text */
    background-color: var(--w-color-surface-button-default); /* Transparent background */
    background-image: none; /* Reset any gradient */
    border: 1px solid var(--w-color-surface-button-default); /* Primary color for border */
}

/* Hover state */
.btn-outline-primary:hover {
    color: var(--w-color-text-button); /* White text on hover */
    background-color: var(--w-color-surface-button-default); /* Primary color background */
    border-color: var(--w-color-surface-button-default); /* Ensure border matches */
}

/* Focus state */
.btn-outline-primary:focus,
.btn-outline-primary.focus {
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25); /* Focus ring */
}

/* Active/Pressed state */
.btn-outline-primary:active,
.btn-outline-primary.active {
    color: var(--w-color-text-button); /* White text */
    background-color: var(--w-color-surface-button-default); /* Primary color background */
    border-color: var(--w-color-surface-button-default); /* Match border */
}

/* Disabled state */
.btn-outline-primary:disabled,
.btn-outline-primary.disabled {
    color: var(--w-color-text-button); /* Keep text color */
    background-color: transparent; /* Still transparent */
    border-color: var(--w-color-surface-button-default); /* Keep border color */
    opacity: 0.65; /* Reduced opacity for disabled look */
}

/* Base styles for the button */
.btn-outline-secondary {
    /* Core button styles (from Bootstrap's .btn class) */
    display: inline-block;
    font-weight: 400;
    line-height: 1.5;
    text-align: center;
    text-decoration: none;
    vertical-align: middle;
    cursor: pointer;
    user-select: none;
    padding: 0.375rem 0.75rem; /* Default padding */
    font-size: 1rem; /* Default font size */
    border-radius: 0.375rem; /* Default border-radius in Bootstrap 5 */
    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;

    /* Outline-specific styles */
    color: #6c757d; /* Secondary color for text */
    background-color: transparent; /* Transparent background */
    background-image: none; /* Reset any gradient */
    border: 1px solid #6c757d; /* Secondary color for border */
}

/* Hover state */
.btn-outline-secondary:hover {
    color: #fff; /* White text on hover */
    background-color: #6c757d; /* Secondary color background */
    border-color: #6c757d; /* Ensure border matches */
}

.chooser-loading-search {
    position: relative;
}

.chooser-loading-search input[name="q"],
.chooser-loading-search input[type="search"] {
    padding-right: 2.5rem;
}

[data-chooser-loading] {
    align-items: center;
    display: none;
    height: 1.25rem;
    justify-content: center;
    pointer-events: none;
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1.25rem;
    z-index: 2;
}

[data-chooser-loading]::before {
    animation: tdwChooserSpin 0.65s linear infinite;
    border: 2px solid rgba(0, 0, 0, 0.18);
    border-top-color: #005a5a;
    border-radius: 50%;
    content: "";
    height: 1rem;
    width: 1rem;
}

form[data-chooser-loading-busy="true"] [data-chooser-loading] {
    display: inline-flex;
}

form[data-chooser-loading-busy="true"] button[type="submit"],
form[data-chooser-loading-busy="true"] input[type="submit"] {
    opacity: 0.72;
}

@keyframes tdwChooserSpin {
    to {
        transform: rotate(360deg);
    }
}

/* Focus state */
.btn-outline-secondary:focus,
.btn-outline-secondary.focus {
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(108, 117, 125, 0.25); /* Focus ring */
}

/* Active/Pressed state */
.btn-outline-secondary:active,
.btn-outline-secondary.active {
    color: #fff; /* White text */
    background-color: #6c757d; /* Secondary color background */
    border-color: #6c757d; /* Match border */
}

/* Disabled state */
.btn-outline-secondary:disabled,
.btn-outline-secondary.disabled {
    color: #6c757d; /* Keep text color */
    background-color: transparent; /* Still transparent */
    border-color: #6c757d; /* Keep border color */
    opacity: 0.65; /* Reduced opacity for disabled look */
}

.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5); /* Semi-transparent background */
    display: none; /* Hidden by default */
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3; /* Light grey */
    border-top: 4px solid #3498db; /* Blue */
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

#organizer-buttons button.active {
    background-color: var(--w-color-surface-button-hover);
}

.tour-listing-table td.field-name.title {
    display: grid;
    justify-content: flex-start;
}

/*  .tour-listing-table th:first-child,
.tour-listing-table td:first-child {
    min-width: 17rem;
    white-space: normal;
}

.tour-listing-table th:nth-child(3),
.tour-listing-table td:nth-child(3),
.tour-listing-table th:nth-child(4),
.tour-listing-table td:nth-child(4){
    min-width: 10rem;
    white-space: normal;
}

@media screen and (min-width: 75em) {
    .modeladmin .result-list.col9 {
        width: 87% !important;
    }
    .modeladmin .changelist-filter{
        width: 13% !important;
    }
} */

.scrollable-checkbox {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #ccc;
    padding: 10px;
}

.scrollable-checkbox div {
    margin: 0 0 5px 0;
}

.duration-row > .w-field-row {
    gap: 65px !important;
}

/* Modal overlay */
#import-trips-modal,
#sync-trips-modal {
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

/* Modal container */
.custom-modal {
    background: white;
    padding: 20px;
    border-radius: 8px;
    width: 400px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

/* Form spacing */
.form-group {
    margin-bottom: 15px;
}

/* Modal buttons */
.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Loading spinner */
.custom-spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-top: 4px solid #000;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    animation: spin 1s linear infinite;
    margin: auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Loading text */
.loading-text {
    margin-top: 8px;
    font-size: 14px;
    color: #333;
    text-align: center;
}
