/* Plan Routes custom overrides on top of the Materio theme */

.dropzone-upload {
    position: relative;
    border: 2px dashed var(--bs-border-color);
    border-radius: 0.5rem;
    padding: 2.5rem 1rem;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease;
    background-color: var(--bs-body-bg);
}

.dropzone-upload:hover,
.dropzone-upload.dragover {
    border-color: var(--bs-primary);
    background-color: rgba(var(--bs-primary-rgb), 0.04);
}

.dropzone-upload i {
    font-size: 2.5rem;
    color: var(--bs-primary);
}

.dropzone-upload.is-uploading {
    cursor: default;
    pointer-events: none;
}

.dropzone-loading-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border-radius: 0.5rem;
    background-color: rgba(var(--bs-body-bg-rgb, 255, 255, 255), 0.85);
    color: var(--bs-primary);
    font-weight: 500;
    font-size: 0.875rem;
}

.gallery-thumb {
    position: relative;
    border-radius: 0.5rem;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    border: 1px solid var(--bs-border-color);
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-thumb .gallery-thumb-actions {
    position: absolute;
    top: 0.35rem;
    right: 0.35rem;
    display: flex;
    gap: 0.25rem;
}

.gallery-thumb.is-cover::after {
    content: 'Cover';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(var(--bs-primary-rgb), 0.85);
    color: #fff;
    font-size: 0.7rem;
    text-align: center;
    padding: 2px 0;
}

/* Availability status badges */
.status-dot {
    display: inline-block;
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    margin-right: 0.35rem;
}
.status-dot.status-available { background-color: #16a34a; }
.status-dot.status-booked { background-color: #dc3545; }
.status-dot.status-maintenance { background-color: #ffb400; }
.status-dot.status-blocked,
.status-dot.status-temporarily_closed { background-color: #8a8d93; }

.skeleton {
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.06) 25%, rgba(0, 0, 0, 0.1) 37%, rgba(0, 0, 0, 0.06) 63%);
    background-size: 400% 100%;
    animation: skeleton-loading 1.4s ease infinite;
    border-radius: 0.375rem;
}
@keyframes skeleton-loading {
    0% { background-position: 100% 50%; }
    100% { background-position: 0 50%; }
}

.empty-state {
    text-align: center;
    padding: 3rem 1rem;
}
.empty-state i {
    font-size: 3rem;
    color: var(--bs-secondary-color);
    margin-bottom: 1rem;
}

.cursor-pointer { cursor: pointer; }

.layout-navbar.bg-navbar-theme {
    background-color: #fff !important;
}

.layout-menu.bg-menu-theme {
    background-color: #fff !important;
}

.table > thead th {
    font-size: 12px;
}

.table > tbody td {
    font-size: 12px;
}

.fab-btn {
    position: fixed;
    right: 1.5rem;
    bottom: 1.5rem;
    width: 3.25rem;
    height: 3.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.25);
    z-index: 1030;
}

/* Align Select2 boxes with Bootstrap's form-select height/border */
.select2-container {
    width: 100% !important;
}
.select2-container .select2-selection--single {
    height: calc(2.375rem + 2px) !important;
    border-color: var(--bs-border-color) !important;
    border-radius: 0.375rem !important;
    background-color: var(--bs-body-bg);
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: calc(2.375rem + 2px) !important;
    padding-left: 0.875rem;
    padding-right: 1.75rem;
    color: var(--bs-body-color);
}
.select2-container--default .select2-selection--single .select2-selection__placeholder {
    color: var(--bs-secondary-color);
}
.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: calc(2.375rem + 2px) !important;
    top: 0 !important;
    right: 0.5rem !important;
}
.select2-dropdown {
    border-color: var(--bs-border-color) !important;
}
.select2-container--default .select2-search--dropdown .select2-search__field {
    border-color: var(--bs-border-color);
    border-radius: 0.375rem;
    padding: 0.375rem 0.75rem;
}
.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: var(--bs-primary) !important;
}

/* Availability calendar grid (Bootstrap's row-cols utilities stop at 6) */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

/* Chip-style checkboxes: facility/food amenities and indoor/outdoor activities */
.chip-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.choice-chip {
    position: relative;
}

.choice-chip-input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.choice-chip-label {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.95rem;
    border: 1px solid var(--bs-border-color);
    border-radius: 2rem;
    background-color: var(--bs-body-bg);
    color: var(--bs-body-color);
    font-size: 0.8125rem;
    font-weight: 500;
    line-height: 1.2;
    cursor: pointer;
    user-select: none;
    transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.choice-chip-label:hover {
    border-color: var(--bs-primary);
}

.choice-chip-icon {
    display: inline-flex;
    font-size: 1rem;
    line-height: 1;
}

.choice-chip-icon .ri-checkbox-circle-fill {
    display: none;
    color: var(--bs-primary);
}

.choice-chip-icon .ri-checkbox-blank-circle-line {
    display: inline-block;
    color: var(--bs-secondary-color);
}

.choice-chip-input:checked + .choice-chip-label {
    border-color: var(--bs-primary);
    background-color: rgba(var(--bs-primary-rgb), 0.08);
    color: var(--bs-primary);
}

.choice-chip-input:checked + .choice-chip-label .ri-checkbox-circle-fill {
    display: inline-block;
}

.choice-chip-input:checked + .choice-chip-label .ri-checkbox-blank-circle-line {
    display: none;
}

.choice-chip-input:focus-visible + .choice-chip-label {
    outline: 2px solid var(--bs-primary);
    outline-offset: 2px;
}

.amenity-add-row {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
    color: var(--bs-secondary-color);
}

.amenity-add-row .amenity-new-input {
    border: 1px dashed var(--bs-border-color);
    border-radius: 2rem;
    padding: 0.4rem 0.9rem;
    font-size: 0.8125rem;
    background: transparent;
    color: var(--bs-body-color);
    min-width: 220px;
}

.amenity-add-row .amenity-new-input:focus {
    outline: none;
    border-style: solid;
    border-color: var(--bs-primary);
}

/* Small solid-green pill button, reused for amenity quick-add and Add Attraction */
.btn-pill-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    border: none;
    border-radius: 1.5rem;
    padding: 0.4rem 0.85rem;
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1.2;
    color: #fff;
    background-color: var(--bs-primary);
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.btn-pill-primary:hover {
    background-color: var(--bs-primary-text-emphasis, var(--bs-primary));
    color: #fff;
}

.btn-pill-primary:disabled {
    opacity: 0.6;
    cursor: default;
}

.btn-pill-primary i {
    font-size: 0.9rem;
    line-height: 1;
}

/* Nearby attraction rows (resort form) */
.attractions-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.attraction-row {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.75rem;
    border: 1px solid var(--bs-border-color);
    border-radius: 0.5rem;
    background-color: var(--bs-body-bg);
    transition: border-color 0.15s ease;
}

.attraction-row:hover {
    border-color: rgba(var(--bs-primary-rgb), 0.4);
}

.attraction-row-fields {
    flex: 1 1 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 2fr;
    gap: 0.6rem;
}

@media (max-width: 767.98px) {
    .attraction-row-fields {
        grid-template-columns: 1fr;
    }
}

.attraction-field {
    position: relative;
}

.attraction-field i {
    position: absolute;
    left: 0.7rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.9rem;
    color: var(--bs-secondary-color);
    pointer-events: none;
}

.attraction-field .form-control {
    padding-left: 2rem !important;
}

.attraction-remove-btn {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    margin-top: 0.15rem;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: var(--bs-secondary-color);
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.attraction-remove-btn:hover {
    background-color: rgba(var(--bs-danger-rgb), 0.1);
    color: var(--bs-danger);
}

/* AJAX table-refresh loading overlay (categories list, pagination) */
.table-loading-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(var(--bs-body-bg-rgb, 255, 255, 255), 0.7);
    z-index: 5;
}

/* Auth pages (login, forgot/reset password, etc.) - tighter, aligned layout on mobile */
@media (max-width: 575.98px) {
    .authentication-wrapper.authentication-basic {
        padding-top: 1.5rem !important;
        padding-bottom: 1.5rem !important;
    }

    .authentication-inner {
        margin-left: 0.75rem !important;
        margin-right: 0.75rem !important;
        padding-top: 0 !important;
        padding-bottom: 0 !important;
    }

    .authentication-inner .card {
        padding: 1.5rem 1.25rem !important;
    }

    .authentication-inner .app-brand {
        margin-top: 0.25rem !important;
    }

    .authentication-inner .app-brand img {
        height: 52px !important;
    }

    .authentication-inner .card-body {
        margin-top: 0.75rem !important;
        padding: 0 !important;
    }

    .authentication-inner .card-body h3,
    .authentication-inner .card-body h4 {
        font-size: 1.15rem;
    }

    .authentication-inner .card-body p {
        font-size: 0.8125rem;
    }

    .authentication-inner .form-control,
    .authentication-inner .form-floating > label {
        font-size: 0.8125rem;
    }

    .authentication-inner .form-check-label {
        font-size: 0.75rem !important;
    }

    .authentication-inner .card-body a {
        font-size: 0.8125rem;
    }

    .authentication-inner .btn {
        font-size: 0.8125rem;
        padding: 0.5rem 1rem;
    }

    .authentication-inner .mb-5 {
        margin-bottom: 1rem !important;
    }

    .authentication-inner .mb-3 {
        margin-bottom: 0.75rem !important;
    }
}

/* Category list page - tighter, more usable layout on mobile */
@media (max-width: 767.98px) {
    .category-list-card > .card-header {
        padding: 0.75rem 1rem;
        font-size: 0.95rem;
    }

    .category-list-card > .card-header .btn {
        font-size: 0.75rem;
        padding: 0.4rem 0.65rem;
    }

    .category-list-card > .card-header .btn i {
        font-size: 0.85rem;
    }

    .category-list-card .table > :not(caption) > * > * {
        padding: 0.5rem 0.6rem;
    }

    .category-list-card .table > thead th {
        font-size: 10.5px;
        white-space: nowrap;
    }

    .category-list-card .table > tbody td {
        font-size: 11.5px;
    }

    .category-list-card .table i.ri-22px {
        font-size: 1.05rem;
    }

    .category-list-card .table .badge {
        font-size: 0.65rem;
        padding: 0.3em 0.55em;
    }

    .category-list-card .table .btn-icon {
        width: 1.75rem;
        height: 1.75rem;
    }

    .category-list-card .table .btn-icon i {
        font-size: 0.9rem;
    }

    .category-list-card .card-body {
        padding: 0.75rem 1rem;
    }

    .category-list-card .card-body .pagination {
        --bs-pagination-padding-x: 0.5rem;
        --bs-pagination-padding-y: 0.3rem;
        --bs-pagination-font-size: 0.75rem;
        flex-wrap: wrap;
        row-gap: 0.35rem;
    }

    .category-list-card .empty-state {
        padding: 2rem 1rem;
    }

    .category-list-card .empty-state i {
        font-size: 2.25rem;
    }
}

@media (max-width: 575.98px) {
    .category-list-card .table > :not(caption) > * > * {
        padding: 0.5rem 0.4rem;
    }

    .category-list-card .table th:first-child,
    .category-list-card .table td:first-child {
        padding-left: 0.6rem;
    }

    .category-list-card .table th:last-child,
    .category-list-card .table td:last-child {
        padding-right: 0.6rem;
    }

    .category-list-card .table .btn-icon {
        width: 1.6rem;
        height: 1.6rem;
    }

    .category-list-card .table .btn-icon i {
        font-size: 0.8rem;
    }
}

/* Resorts list page - tighter, more usable layout on mobile */
@media (max-width: 767.98px) {
    .resorts-page .card-body {
        padding: 0.75rem 1rem;
    }

    .resorts-page #filterForm {
        row-gap: 0.5rem !important;
    }

    .resorts-page #filterForm .form-label {
        font-size: 0.75rem;
        margin-bottom: 0.15rem;
    }

    .resorts-page #filterForm .form-control,
    .resorts-page #filterForm .form-select {
        font-size: 0.8125rem;
        padding: 0.35rem 0.6rem;
        min-height: calc(1.5em + 0.7rem + 2px);
    }

    .resorts-page #resetFilters {
        font-size: 0.75rem;
        padding: 0.4rem 0.65rem;
    }

    .resorts-page .table > thead th {
        font-size: 10.5px;
        white-space: nowrap;
    }

    .resorts-page .table > tbody td {
        font-size: 11.5px;
    }

    .resorts-page .table > :not(caption) > * > * {
        padding: 0.5rem 0.6rem;
    }

    .resorts-page .table .badge {
        font-size: 0.65rem;
        padding: 0.3em 0.55em;
    }

    .resorts-page .table .btn-icon {
        width: 1.75rem;
        height: 1.75rem;
    }

    .resorts-page .table .btn-icon i {
        font-size: 0.9rem;
    }

    .resorts-page .fab-btn {
        right: 1rem;
        bottom: 1rem;
        width: 2.75rem;
        height: 2.75rem;
    }

    .resorts-page .fab-btn i {
        font-size: 1.25rem !important;
    }
}

@media (max-width: 575.98px) {
    .resorts-page .table > :not(caption) > * > * {
        padding: 0.5rem 0.4rem;
    }

    .resorts-page .table th:first-child,
    .resorts-page .table td:first-child {
        padding-left: 0.6rem;
    }

    .resorts-page .table th:last-child,
    .resorts-page .table td:last-child {
        padding-right: 0.6rem;
    }

    .resorts-page .table .btn-icon {
        width: 1.6rem;
        height: 1.6rem;
    }

    .resorts-page .table .btn-icon i {
        font-size: 0.8rem;
    }
}

/* Reports page filters - smaller labels on mobile */
@media (max-width: 575.98px) {
    .reports-page .form-label {
        font-size: 10px;
    }

    .reports-page .form-control {
        font-size: 12px;
    }
}
