/* ═══════════════════════════════════════════════
   CompaRate - Custom Overrides
   ═══════════════════════════════════════════════ */

/* ── Page Loader ── */
.loader.simple-loader {
    background: #fff !important;
}
.loader.simple-loader .loader-body {
    display: flex !important;
    align-items: center;
    justify-content: center;
}
.custom-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}
/* Dual ring spinner */
.loader-rings {
    position: relative;
    width: 64px;
    height: 64px;
}
.loader-rings .ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 3px solid transparent;
}
.loader-rings .ring-outer {
    border-top-color: #3a57e8;
    border-right-color: #3a57e8;
    animation: loader-spin 1s cubic-bezier(0.5, 0, 0.5, 1) infinite;
}
.loader-rings .ring-inner {
    inset: 8px;
    border-bottom-color: #8A92A6;
    border-left-color: #8A92A6;
    animation: loader-spin-reverse 0.8s cubic-bezier(0.5, 0, 0.5, 1) infinite;
}
.loader-rings .ring-dot {
    position: absolute;
    width: 8px;
    height: 8px;
    background: #3a57e8;
    border-radius: 50%;
    top: 28.5px;
    left: 50%;
    transform: translateX(-50%);
    animation: loader-pulse 1s ease-in-out infinite;
}
/* Brand text */
.loader-brand {
    font-size: 1.3rem;
    font-weight: 700;
    color: #232D42;
    letter-spacing: 0.03em;
    animation: loader-fade-in 0.6s ease-out;
}
.loader-brand span {
    color: #8A92A6;
    font-weight: 400;
}
/* Progress bar */
.loader-progress {
    width: 120px;
    height: 3px;
    background: #e8eeff;
    border-radius: 3px;
    overflow: hidden;
}
.loader-progress-bar {
    width: 40%;
    height: 100%;
    background: linear-gradient(90deg, #3a57e8, #6c84f5);
    border-radius: 3px;
    animation: loader-slide 1.2s ease-in-out infinite;
}
@keyframes loader-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
@keyframes loader-spin-reverse {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(-360deg); }
}
@keyframes loader-pulse {
    0%, 100% { opacity: 1; transform: translateX(-50%) scale(1); }
    50% { opacity: 0.4; transform: translateX(-50%) scale(0.6); }
}
@keyframes loader-slide {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(350%); }
}
@keyframes loader-fade-in {
    0% { opacity: 0; transform: translateY(8px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* ── Dashboard stat cards ── */
.stat-card {
    border-left: 4px solid;
    border-radius: 0.5rem;
}

.stat-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.stat-card .stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.2;
}

.stat-card .stat-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

/* ── Toast positioning ── */
#toast-container {
    z-index: 1090;
}

/* ── Utilities ── */
.cursor-pointer {
    cursor: pointer;
}

.min-w-0 {
    min-width: 0;
}

.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── Form placeholders (override Hope UI vendor-prefixed rules) ── */
.form-control::-webkit-input-placeholder {
    color: #c9ced6 !important;
    opacity: 1 !important;
    font-style: italic;
}
.form-control::-moz-placeholder {
    color: #c9ced6 !important;
    opacity: 1 !important;
    font-style: italic;
}
.form-control::-ms-input-placeholder {
    color: #c9ced6 !important;
    opacity: 1 !important;
    font-style: italic;
}
.form-control::placeholder {
    color: #c9ced6 !important;
    opacity: 1 !important;
    font-style: italic;
}

/* ── Browser autofill override ── */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px #fff inset !important;
    -webkit-text-fill-color: #8A92A6 !important;
    transition: background-color 5000s ease-in-out 0s;
}

/* ── Select2 → Hope UI theme ── */
.select2-container--default .select2-selection--single,
.select2-container--default .select2-selection--multiple {
    background-color: #fff;
    border: 1px solid #eee;
    border-radius: 0.25rem;
    min-height: calc(1.5em + 1rem + 2px);
    padding: 0.35rem 0.75rem;
    font-size: 1rem;
    font-weight: 400;
    color: #8A92A6;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #8A92A6;
    line-height: 1.5;
    padding-left: 0;
    padding-right: 1.5rem;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: calc(1.5em + 1rem);
    right: 0.5rem;
}

.select2-container--default .select2-selection--single .select2-selection__placeholder {
    color: #bcc1ca;
}

.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--focus .select2-selection--multiple,
.select2-container--default.select2-container--open .select2-selection--single,
.select2-container--default.select2-container--open .select2-selection--multiple {
    border-color: #9dabf4;
    box-shadow: 0 0 0 0, 0 0.125rem 0.25rem 0 rgba(58, 87, 232, 0.15);
    outline: 0;
}

/* Multi-select tags */
.select2-container--default .select2-selection--multiple .select2-selection__choice {
    background-color: #3a57e8;
    border: none;
    color: #fff;
    border-radius: 0.2rem;
    padding: 0.15rem 0.5rem;
    margin: 0.15rem 0.25rem 0.15rem 0;
    font-size: 0.875rem;
    line-height: 1.4;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    color: rgba(255, 255, 255, 0.7);
    margin-right: 0.35rem;
    font-size: 1rem;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
    color: #fff;
}

.select2-container--default .select2-selection--multiple .select2-search__field {
    color: #8A92A6;
    font-size: 1rem;
}

.select2-container--default .select2-selection--multiple .select2-search__field::placeholder {
    color: #bcc1ca;
}

/* Dropdown panel */
.select2-container--default .select2-dropdown {
    border-color: #eee;
    border-radius: 0.25rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
}

.select2-container--default .select2-search--dropdown .select2-search__field {
    border: 1px solid #eee;
    border-radius: 0.25rem;
    padding: 0.4rem 0.75rem;
    font-size: 0.9rem;
    color: #8A92A6;
}

.select2-container--default .select2-search--dropdown .select2-search__field:focus {
    border-color: #9dabf4;
    outline: 0;
}

.select2-container--default .select2-results__option {
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
    color: #232D42;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: #3a57e8;
    color: #fff;
}

.select2-container--default .select2-results__option[aria-selected=true] {
    background-color: #f0f4ff;
    color: #3a57e8;
}

/* Full width fix */
.select2-container {
    width: 100% !important;
}

/* ── Date range visual cards (Schedules page) ── */
.date-range-card {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.6rem;
    border-left: 3px solid #495057;
    background: #f8f9fa;
    border-radius: 0 0.25rem 0.25rem 0;
    margin-bottom: 0.3rem;
    transition: all 0.2s;
    font-size: 0.8rem;
}

.date-range-card:hover {
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    background: #f0f1f3;
}

.date-range-card.empty {
    border-left-color: #ced4da;
    border-left-style: dashed;
    background: #fff;
}

.date-range-card.empty .date-range-num {
    background: #ced4da;
}

.date-range-card.empty .date-range-dates {
    color: #ced4da;
    font-style: italic;
}

.date-range-nights .badge-new {
    background: #fd7e14;
    color: #fff;
    padding: 0.1rem 0.4rem;
    border-radius: 0.2rem;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.date-range-num {
    width: 20px;
    height: 20px;
    background: #495057;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 700;
    flex-shrink: 0;
}

.date-range-dates {
    flex: 1;
    font-weight: 500;
    font-size: 0.78rem;
    cursor: pointer;
}

.date-range-dates .arrow {
    color: #adb5bd;
    margin: 0 0.3rem;
}

.date-range-nights {
    background: #e9ecef;
    color: #495057;
    padding: 0.1rem 0.45rem;
    border-radius: 0.2rem;
    font-size: 0.7rem;
    font-weight: 600;
    white-space: nowrap;
}

.date-range-card.empty .date-range-nights {
    background: none;
    padding: 0;
}

.date-range-card .btn-remove-date {
    opacity: 0.3;
    transition: opacity 0.2s;
    font-size: 0.7rem;
    padding: 0.1rem 0.3rem;
}

.date-range-card:hover .btn-remove-date {
    opacity: 1;
}

.date-range-card .flatpickr-input {
    position: absolute;
    width: 0;
    height: 0;
    opacity: 0;
    pointer-events: none;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    margin-right: 0.35rem;
    border-right: 0px;
}
.select2-container--default .select2-selection--multiple .select2-selection__choice__display {
    padding-left: 12px;
}
.select2-container--default .select2-selection--multiple .select2-selection__clear {
    margin-top: 1px;
}
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover, .select2-container--default .select2-selection--multiple .select2-selection__choice__remove:focus {
    background-color: transparent;
}
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
    color: #fff;
}

/* ── All Schedules – Filter bar input-group (search period) ── */
.filter-bar .input-group {
    height: 31px;
}
.filter-bar .input-group .input-group-text,
.filter-bar .input-group .form-control,
.filter-bar .input-group .form-select {
    font-size: 0.875rem;
    padding-top: 0.2rem;
    padding-bottom: 0.2rem;
}

/* ── All Schedules – Filter bar Select2 compact ── */
.filter-bar .select2-container--default .select2-selection--single,
.filter-bar .select2-container--default .select2-selection--multiple {
    min-height: 31px;
    padding: 0.15rem 0.5rem;
    font-size: 0.875rem;
    line-height: 1.4;
}
.filter-bar .select2-container--default .select2-selection--multiple .select2-selection__choice {
    font-size: 0.75rem;
    padding: 0.05rem 0.4rem;
    margin: 0.1rem 0.15rem 0.1rem 0;
}
.filter-bar .select2-container--default .select2-selection--multiple .select2-search__field {
    font-size: 0.875rem;
    margin-top: 2px;
}

/* ── All Schedules – Compact table ── */
.as-table-wrap {
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
}
.as-table {
    font-size: 0.78rem;
    white-space: nowrap;
}
.as-table thead th {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #6c757d;
    border-bottom-width: 2px;
    padding: 0.4rem 0.5rem;
    white-space: nowrap;
}
.as-table tbody td {
    padding: 0.3rem 0.5rem;
    vertical-align: middle;
}
.as-col-hotel {
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
}
.as-col-room {
    max-width: 130px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.as-col-provider {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
/* Smaller badges in table */
.as-table .badge {
    font-size: 0.68rem;
    padding: 0.15rem 0.4rem;
}
/* DataTables top/bottom bars */
.as-dt-top {
    border-bottom: 1px solid #eee;
    font-size: 0.82rem;
}
.as-dt-top .dataTables_length label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0;
    font-size: 0.82rem;
    color: #6c757d;
}
.as-dt-top .dataTables_length select {
    width: auto;
    padding: 0.2rem 1.8rem 0.2rem 0.5rem;
    font-size: 0.82rem;
}
/* DataTables bottom bar — info + pagination */
.as-dt-bottom {
    border-top: 1px solid #eee;
    font-size: 0.78rem;
}
.as-dt-bottom .dataTables_info {
    font-size: 0.78rem;
    color: #6c757d;
    white-space: nowrap;
}

/* ── Pagination (Bootstrap 5 page-item / page-link) ── */
.as-dt-bottom .dataTables_paginate {
    margin: 0;
}
.as-dt-bottom .pagination {
    margin: 0;
    gap: 2px;
}
/* Base page-link button */
.as-dt-bottom .page-item .page-link {
    padding: 0.2rem 0.55rem;
    font-size: 0.75rem;
    line-height: 1.4;
    min-width: 28px;
    text-align: center;
    color: #6c757d;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 4px !important;
    transition: all 0.15s ease;
}
/* Active page */
.as-dt-bottom .page-item.active .page-link {
    background: #3a57e8;
    border-color: #3a57e8;
    color: #fff;
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(58, 87, 232, 0.3);
}
/* Hover state */
.as-dt-bottom .page-item:not(.active):not(.disabled) .page-link:hover {
    background: #f0f4ff;
    border-color: #bcc5f9;
    color: #3a57e8;
}
/* Disabled (Previous/Next at boundaries) */
.as-dt-bottom .page-item.disabled .page-link {
    color: #c9ced6;
    background: #f8f9fa;
    border-color: #eee;
    pointer-events: none;
}
/* Focus ring */
.as-dt-bottom .page-item .page-link:focus {
    box-shadow: 0 0 0 0.15rem rgba(58, 87, 232, 0.2);
    z-index: 1;
}

/* ── All Schedules – Side filter compact checkboxes ── */
.form-check-sm {
    min-height: 1.2rem;
    margin-bottom: 0.1rem;
}
.form-check-sm .form-check-input {
    width: 0.9em;
    height: 0.9em;
    margin-top: 0.2em;
}
.form-check-sm .form-check-label {
    font-size: 0.78rem;
    line-height: 1.3;
}
table.competitiveness-table.dataTable {
    clear: both;
    margin-top: 0px !important;
    margin-bottom: 0px !important;
}