html, body {
    font-family: "Avenir Next", "Nunito Sans", "Segoe UI", sans-serif !important;
    background-color: #F5F7FA;
}

body::-webkit-scrollbar, body::-webkit-scrollbar-button { display: none; } 
html { scrollbar-width: none; } /* Firefox */
body { -ms-overflow-style: none; }

/* .page {
    height: 100vh; 
    overflow: hidden; 
} */

.fade-in {
    opacity: 0; /* start hidden */
    transform: translateY(10px); /* optional: slide up */
    transition: opacity 0.3s ease, transform 0.3s ease;
}

    .fade-in.show {
        opacity: 1;
        transform: translateY(0);
    }

h1:focus {
    outline: none;
}

a, .btn-link {
    color: #0071c1;
}

.bg-card {
    background: #F5F7FA;
}


*:focus {
    outline: none !important;
    box-shadow: none !important;
}


.content {
    padding-top: 1.1rem;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.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."
    }

.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem auto;
}

    .loading-progress circle {
        fill: none;
        stroke: #e0e0e0;
        stroke-width: 0.6rem;
        transform-origin: 50% 50%;
        transform: rotate(-90deg);
    }

        .loading-progress circle:last-child {
            stroke: #1b6ec2;
            stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
            transition: stroke-dasharray 0.05s ease-in-out;
        }

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

    .loading-progress-text:after {
        content: var(--blazor-load-percentage-text, "Loading");
    }

code {
    color: #c02d76;
}

.form-control:focus {
    border-color: none !important; /* keep the normal border */
    box-shadow: none !important; /* remove the blue glow */
    outline: #287bb5 !important; /* remove any outline */
}

.btn:focus {
    border: none !important; /* keep the normal border */
    box-shadow: none !important; /* remove the blue glow */
}

.btn:focus,
.btn:focus-visible {
    box-shadow: none !important;
}

/*------------------------ Dropdown ---------------------------*/
.dropdown-cursor {
    cursor: pointer !important;
}

.dropdown-menu .dropdown-item:hover {
    background: linear-gradient( 90deg, rgba(52, 89, 230, 0.1), rgba(47, 179, 128, 0.1) );
    color: var(--bs-primary);
}

.dropdown-menu .dropdown-item{
    padding: 0.35rem 0.75rem;
}

.dropdown-menu{
    padding: 0;
}

.text-logo {
    color: #ffef61 !important;
    font-family: 'Avenir Serif Libre', cursive !important;
}

.text-blue {
    color: #2a3b57 !important;
}

.text-green {
    color: #1b8c19 !important;
}

.bg-modal{
    background: #2a3b57;
    color: #ffef61;
}

.bg-mix-red {
    background: linear-gradient(90deg, rgba(218, 41, 46, 0.9), rgba(170, 30, 35, 0.9) );
    color: white;
}
/*------------------ Tables Layout ----------------------*/
.table-custom-hover > tbody > tr:hover > * {
    background: linear-gradient( 90deg, rgba(52, 89, 230, 0.05), rgba(47, 179, 128, 0.05)) !important;
}

.categories-table-container {
    max-height: calc(40vh - 3rem); /* subtract padding or other elements inside modal if needed */
    overflow-y: auto;
    box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.1);
}


.sticky-header th {
    position: sticky;
    top: 0; /* stick to the top of container */
    z-index: 10; /* make sure it�s above the body rows */
}

/*------------------ Custom Modal ----------------------*/
.my-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0);
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
    pointer-events: none;
    z-index: 1040;
}

    .my-modal-backdrop.show {
        opacity: 0.5;
        background-color: rgba(0,0,0,0.5);
        pointer-events: auto;
    }

.my-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    opacity: 0;
    transition: all 0.2s ease-in-out;
    z-index: 1050;
    width: 500px;
    max-width: 90%;
}

    .my-modal.show {
        opacity: 1 !important;
        transform: translate(-50%, -50%) scale(1) !important;
    }

.my-modal-dialog {
    display: flex;
    flex-direction: column;
}

.my-modal-content {
    background-color: #fff;
    border-radius: 0.3rem;
    box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.5);
    overflow: visible;
}

.my-modal-header, .my-modal-footer {
    padding: 0.5rem 0.5rem 0.5rem 1rem;
    border-bottom: 1px solid #dee2e6;
}

.my-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 53px;
}

.my-modal-body {
    padding: 1rem;
    max-height: 70vh;
}

.my-modal-footer {
    border-top: 1px solid #dee2e6;
    display: flex;
    justify-content: flex-end;
}

.my-modal-close {
    border: none;
    background: transparent;
    font-size: 1.75rem; /* slightly bigger */
    cursor: pointer;
    display: inline-block;
    width: 1.25em;
    height: 1.25em;
    text-align: center;
    line-height: 1;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.5); /* dark theme style */
    opacity: 1;
    transition: color 0.15s ease, opacity 0.15s ease;
}

    .my-modal-close:hover {
        color: rgba(255, 255, 255, 0.75); /* slightly brighter on hover */
    }

    .my-modal-close:focus {
        outline: 0;
        box-shadow: 0 0 0 0.25rem rgba(255, 255, 255, 0.25);
        color: rgba(255, 255, 255, 0.75);
    }

.my-modal-header > h5 {
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .my-modal {
        width: 94vw;
        max-width: 94vw;
    }

    .my-modal-dialog,
    .my-modal-content {
        max-height: 88vh;
    }

    .my-modal-content {
        overflow: hidden;
        display: flex;
        flex-direction: column;
    }

    .my-modal-body {
        overflow: hidden;
        min-height: 0;
        padding: 0.75rem;
    }
}

/* Dataset manager modal containment and mobile responsiveness */
.my-modal-body .dataset-manager-modal {
    display: flex;
    flex-direction: column;
    max-width: 100%;
    min-width: 0;
    max-height: calc(70vh - 2rem);
    overflow: hidden;
}

.my-modal-body .dataset-list-scroll {
    flex: 1 1 auto;
    min-height: 0;
    max-height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
}

.my-modal-body .dataset-manager-modal .dataset-form-card {
    margin-bottom: 1rem;
}

.my-modal-body .dataset-manager-modal .dataset-edit-form-row {
    margin-bottom: 0.5rem;
}

.my-modal-body .dataset-manager-modal .dataset-form-buttons-row {
    margin-top: 0.5rem;
}

.my-modal-body .dataset-manager-modal .dataset-form-actions {
    display: flex;
    justify-content: flex-end;
    align-items: flex-end;
    gap: 0.5rem;
}

.my-modal-body .dataset-manager-modal .dataset-form-actions .btn {
    min-width: 2.25rem;
}

.my-modal-body .dataset-manager-modal .list-group-item,
.my-modal-body .dataset-manager-modal .dataset-row,
.my-modal-body .dataset-manager-modal .dataset-text {
    min-width: 0;
    max-width: 100%;
}

.my-modal-body .dataset-manager-modal .dataset-text {
    overflow: hidden;
}

.my-modal-body .dataset-manager-modal .dataset-text .fw-semibold,
.my-modal-body .dataset-manager-modal .dataset-text .text-truncate {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.my-modal-body .dataset-manager-modal .dataset-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
    max-width: 100%;
}

@media (max-width: 576px) {
    .my-modal-body .dataset-manager-modal .dataset-actions {
        width: 100%;
    }

    .my-modal-body .dataset-manager-modal .dataset-actions .btn {
        flex: 1 1 auto;
    }

    .my-modal {
        width: 92vw;
        max-width: 92vw;
    }

    .my-modal-body .dataset-manager-modal .dataset-form-actions {
        width: 100%;
        justify-content: stretch;
        margin-top: 0.5rem;
    }

    .my-modal-body .dataset-manager-modal .dataset-form-actions .btn {
        flex: 1 1 auto;
    }

}

/*------------------ Menu Card and Grid ----------------------*/
.menus-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.my-card {
    width: 500px;
    max-width: 90%;
    margin: 1rem auto; /* center horizontally with some spacing */
    border-radius: 0.3rem;
    box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.2);
    background-color: #fff;
    overflow: hidden;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

    .my-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 0.75rem 1.5rem rgba(0,0,0,0.25);
    }

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

.my-card-header {
    display: flex;
}

.my-card-body {
    padding: 1rem;
}

.my-card-footer {
    border-top: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.my-card-close {
    border: none;
    background: transparent;
    font-size: 1.5rem;
    cursor: pointer;
    font-weight: 700;
    color: rgba(0, 0, 0, 0.5);
    transition: color 0.15s ease;
}

    .my-card-close:hover {
        color: rgba(0, 0, 0, 0.8);
    }

.my-card-header > h5 {
    margin-bottom: 0;
}

.clickable {
    cursor: pointer;
    transition: transform 0.1s;
}

    .clickable:hover {
        cursor: pointer;
    }

/* Override Bootstrap form-check styles */

/* Hover effect */
.form-check-input:hover {
    border-color: var(--bs-success);
}

/* Checked state */
.form-check-input:checked {
    background-color: var(--bs-success);
    border-color: var(--bs-success);
}

    /* Centered checkmark */
    .form-check-input:checked::after {
        content: '';
        position: absolute;
        left: 50%;
        top: 50%;
        width: 0.35rem;
        height: 0.65rem;
        border: solid white;
        border-width: 0 0.15rem 0.15rem 0;
        transform: translate(-50%, -60%) rotate(45deg);
    }

.valid.modified:not([type="checkbox"]) {
    outline: none;
}

/* Focus state */
.form-check-input:focus {
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
    border-color: var(--bs-success);
}

/* Disabled state */
.form-check-input:disabled {
    cursor: not-allowed;
    opacity: 0.6;
    background-color: #e9ecef;
}

    .form-check-input:disabled:hover {
        border-color: #ced4da;
    }
/*------------------ Loading Spinner ----------------------*/
.loading-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
}

.loading-spinner {
    text-align: center;
}

/*------------------ Store Card ----------------------*/

.custom-card {
    background: #fff;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.08), 0 8px 20px rgba(0, 0, 0, 0.06);
    margin-bottom: 1.5rem;
    overflow: visible;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

    .custom-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 12px rgba(0, 0, 0, 0.12), 0 12px 28px rgba(0, 0, 0, 0.08);
    }

.custom-card-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top-left-radius: 0.75rem;
    border-top-right-radius: 0.75rem;
}

.custom-card-title {
    font-size: 1.25rem;
    font-weight: 500;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.custom-card-body {
    padding: 1rem 1.5rem;
    border-bottom-left-radius: 0.75rem;
    border-bottom-right-radius: 0.75rem;
}

.custom-card-footer {
    padding: 1rem;
    border-top: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.custom-card-close {
    border: none;
    background: transparent;
    font-size: 1.25rem;
    cursor: pointer;
    color: #6c757d;
    transition: color 0.15s ease;
    padding: 0.25rem;
    border-radius: 0.25rem;
}

    .custom-card-close:hover {
        color: #495057;
        background: rgba(0, 0, 0, 0.05);
    }

.custom-card-clickable {
    cursor: pointer;
}

    .custom-card-clickable:hover {
        background: rgba(0, 0, 0, 0.01);
    }

.custom-card-header > h5 {
    margin-bottom: 0;
}
    /* ----------------- Store Admin --------------------*/

.profile-page {
    overflow: auto;
    height: 100vh;
}

.profile-page::-webkit-scrollbar, 
.profile-page::-webkit-scrollbar-button { display: none; } 

.store-admin-container {
    max-width: 1200px;
    margin: 0 auto;
    /*padding: 1.5rem;*/
}

.admin-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e9ecef;
}

.admin-title {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.25rem;
}

.admin-subtitle {
    color: #6c757d;
    margin-bottom: 0;
}

.admin-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1rem;
    background: #fff;
    border-radius: 0.5rem;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.admin-actions-left,
.admin-actions-right {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}


.admin-actions .btn:disabled {
    cursor: not-allowed;
    opacity: 0.65;
}

.admin-actions .spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

.admin-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.admin-loading-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
}

.admin-loading-spinner {
    text-align: center;
}

/* Responsive design */
@media (max-width: 768px) {
    .store-card-header,
    .store-card-body,
    .store-card-footer {
        padding: 1rem;
    }

    .store-card-title {
        font-size: 1.1rem;
    }

    .store-admin-container {
        padding: 1rem;
    }

    .admin-actions {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }

    .admin-actions-left,
    .admin-actions-right {
        width: 100%;
        justify-content: center;
    }

    .admin-actions .btn {
        flex: 1;
        justify-content: center;
        min-width: auto;
    }

    .admin-actions .me-2 {
        margin-right: 0.5rem !important;
    }
}

@media (max-width: 576px) {
    .admin-actions-left,
    .admin-actions-right {
        flex-direction: column;
        width: 100%;
    }

    .admin-actions .btn {
        width: 100%;
    }
}

/* ----------------- Availability --------------------*/
.status-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 0.5rem;
}

.status-dot-lg {
    width: 15px;
    height: 15px;
    margin-right: 0.75rem;
}

.status-active {
    background-color: #28a745;
    box-shadow: 0 0 0 2px rgba(40, 167, 69, 0.3);
}

.status-inactive {
    background-color: #dc3545;
    box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.3);
}

/* Optional: Add animation for active state */
.status-active {
    animation: pulse-green 2s infinite;
}

/* Dataset icon states */
.dataset-icon-active {
    color: #28a745 !important;
    animation: soft-pulse 2.4s ease-in-out infinite;
}

.dataset-icon-inactive {
    color: #0d6efd;
}

@keyframes soft-pulse {
    0% {
        filter: drop-shadow(0 0 2px rgba(40, 167, 69, 0.4));
    }

    50% {
        filter: drop-shadow(0 0 5px rgba(40, 167, 69, 0.6));
    }

    100% {
        filter: drop-shadow(0 0 2px rgba(40, 167, 69, 0.4));
    }
}

@keyframes pulse-green {
    0% {
        box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.4);
    }

    70% {
        box-shadow: 0 0 0 6px rgba(40, 167, 69, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(40, 167, 69, 0);
    }
}

/*------------------------------ Custom Select -------------------------*/
.custom-select {
    display: block;
    width: var(--select-width, 220px);               /* FIXED WIDTH */
    padding: 0.25rem 0.5rem;    /* REDUCED PADDING */
    font-size: 0.9rem;       /* slightly smaller */
    background-color: var(--bs-body-bg);
    border: var(--bs-border-width) solid var(--bs-border-color);
    box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
    cursor: pointer;
    position: relative;
    user-select: none;
}

.custom-select-text {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    max-width: 100%;
}

.custom-select-arrow {
    transition: transform 0.2s ease-in-out;
    display: flex;
    align-items: center;
}

.custom-select-arrow.open {
    color: #2a3b57;
}

/* Display box */
.custom-select-display {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.25rem;
}

/* Dropdown list */
.custom-select-options {
    position: absolute;
    top: calc(100% + 0.1rem);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); /* Visual indicator of being on top */
}

.custom-select-options.open-upwards {
    top: auto;
    bottom: calc(100% + 0.1rem);
}

/* Each option */
.custom-select-option {
    padding: 0.35rem 0.75rem;
    cursor: pointer;
    font-size: 0.8125rem;
    transition: background 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.custom-select-option > span {
    flex: 1;
    min-width: 0;
}

.custom-select-option-actions {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.custom-select-option-actions .btn-link {
    text-decoration: none;
}

    /* Hover gradient */
    .custom-select-option:hover {
        background: linear-gradient(90deg, rgba(52, 89, 230, 0.1), rgba(47, 179, 128, 0.1));
        color: var(--bs-primary);
    }

    /* Selected option */
    .custom-select-option.selected {
        background: linear-gradient(90deg, rgba(52, 89, 230, 0.2), rgba(47, 179, 128, 0.2));
        font-weight: 400;
        color: var(--bs-primary);
    }

/* Focus state for display box (no shadow) */
.custom-select-display {
    color: var(--bs-body-color);
}

    .custom-select-display:focus {
        box-shadow: none;
        outline: #287bb5;
    }

/* Disabled state */
.custom-select:disabled {
    background-color: #e9ecef;
    cursor: not-allowed;
}

/* --------------------------- For Opening Hours -------------------------*/
.small-dropdown {
    max-width: 120px;
    margin: 0 auto;
}

    .custom-row-hover:hover {
        background: linear-gradient(90deg, rgba(52, 89, 230, 0.05), rgba(47, 179, 128, 0.05)) !important;
    }

/* Save query popover under toolbar button */
.save-query-popover {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.25rem;
    background-color: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: 0.375rem;
    padding: 0.5rem;
    min-width: 220px;
    z-index: 1050;
}

/* Ensure days are centered on all screen sizes */
.col-md-2.text-center {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .custom-row-hover {
        border: 1px solid #dee2e6;
        padding: 0.75rem;
    }

    .small-dropdown {
        max-width: 100px;
    }

    [class^="col-"] {
        margin-bottom: 0.5rem;
    }

        [class^="col-"]:last-child {
            margin-bottom: 0;
        }
}  


/* --------------------------- For Tabs -------------------------*/
.custom-tabs-container {
    display: flex;
    justify-content: center;
    gap: 10px; /* Reduced gap */
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--bs-border-color);
}

.custom-tab {
    padding: 6px 20px; /* Reduced padding for smaller size */
    border-radius: 6px 6px 0 0; /* Rounded top corners only */
    transition: all 0.3s ease;
    cursor: pointer;
    color: var(--bs-body-color);
    border-bottom: 3px solid transparent; /* Bottom border that will show on active */
    margin-bottom: -1px; /* Align with potential content border */
}

    .custom-tab:hover {
        background: linear-gradient(90deg, rgba(52, 89, 230, 0.1), rgba(47, 179, 128, 0.1));
        border-bottom: 3px solid rgba(52, 89, 230, 0.3); /* Subtle border on hover */
    }

    .custom-tab.active {
        background: linear-gradient(90deg, rgba(52, 89, 230, 0.2), rgba(47, 179, 128, 0.2));
        color: var(--bs-primary);
        border-bottom: 3px solid var(--bs-primary); /* Solid colored bottom border */
    }

.plus-icon-circle {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 120px;
    margin: 0 auto;
}

/* Custom smaller search box */
.search-box {
    max-width: 200px !important; /* Smaller width */
    padding: 0.375rem 0.75rem; /* Standard Bootstrap form control padding */
    font-size: 0.875rem; /* Slightly smaller font */
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .search-box {
        max-width: 100% !important; /* Full width on mobile */
    }
}

/* --------------------------- For DatePicker -------------------------*/
.custom-datepicker * {
    transition: all 0.2s ease-in-out;
}

/* Enhanced focus states */
.custom-datepicker-day:focus-visible {
    outline: 2px solid var(--bs-primary);
    outline-offset: 2px;
}

.custom-datepicker-nav-btn:focus-visible,
.custom-datepicker-action-btn:focus-visible {
    outline: 2px solid var(--bs-primary);
    outline-offset: 2px;
}

/* Active state for buttons */
.custom-datepicker-nav-btn:active,
.custom-datepicker-action-btn:active {
    transform: translateY(1px);
    background: linear-gradient(90deg, rgba(52, 89, 230, 0.2), rgba(47, 179, 128, 0.2)) !important;
}

.custom-datepicker {
    position: relative;
    display: inline-block;
}

.custom-datepicker-input {
    position: relative;
    display: flex;
    align-items: center;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 8px 12px;
    background: white;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

    .custom-datepicker-input:hover {
        background: linear-gradient(90deg, rgba(52, 89, 230, 0.1), rgba(47, 179, 128, 0.1));
        border-color: var(--bs-primary);
    }

    .custom-datepicker-input:focus-within {
        border-color: var(--bs-primary);
        box-shadow: 0 0 0 2px rgba(25, 118, 210, 0.2);
        background: linear-gradient(90deg, rgba(52, 89, 230, 0.2), rgba(47, 179, 128, 0.2));
    }

.custom-datepicker-textfield {
    border: none;
    outline: none;
    background: transparent;
    flex: 1;
    cursor: pointer;
    font-size: 14px;
}

.custom-datepicker-icon {
    margin-left: 8px;
    font-size: 16px;
    color: #666;
}

.custom-datepicker-popover {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1000;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    padding: 16px;
    margin-top: 4px;
    min-width: 280px;
}

.custom-datepicker-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.custom-datepicker-nav-btn {
    background: none;
    border: none;
    padding: 4px 8px;
    cursor: pointer;
    border-radius: 4px;
    font-size: 16px;
    transition: all 0.2s ease;
}

    .custom-datepicker-nav-btn:hover {
        background: linear-gradient(90deg, rgba(52, 89, 230, 0.1), rgba(47, 179, 128, 0.1));
    }

.custom-datepicker-month-year {
    font-weight: 500;
    font-size: 14px;
    color: var(--bs-primary);
}

.custom-datepicker-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin-bottom: 8px;
}

.custom-datepicker-weekday {
    text-align: center;
    font-size: 12px;
    font-weight: 500;
    color: #666;
    padding: 4px;
}

.custom-datepicker-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.custom-datepicker-day {
    text-align: center;
    padding: 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

    .custom-datepicker-day:hover {
        background: linear-gradient(90deg, rgba(52, 89, 230, 0.1), rgba(47, 179, 128, 0.1));
        border-color: var(--bs-primary);
        color: var(--bs-primary);
    }

.custom-datepicker-day-selected {
    background: linear-gradient(90deg, rgba(52, 89, 230, 0.2), rgba(47, 179, 128, 0.2));
    color: var(--bs-primary);
    font-weight: 600;
    border-color: var(--bs-primary);
}

    .custom-datepicker-day-selected:hover {
        background: linear-gradient(90deg, rgba(52, 89, 230, 0.3), rgba(47, 179, 128, 0.3));
    }

.custom-datepicker-day-today {
    border: 1px solid var(--bs-primary);
    font-weight: 600;
}

    .custom-datepicker-day-today:hover {
        background: linear-gradient(90deg, rgba(52, 89, 230, 0.1), rgba(47, 179, 128, 0.1));
    }

.custom-datepicker-day-outside {
    color: #ccc;
}

    .custom-datepicker-day-outside:hover {
        background: linear-gradient(90deg, rgba(52, 89, 230, 0.05), rgba(47, 179, 128, 0.05));
        color: #999;
    }

.custom-datepicker-day-empty {
    cursor: default;
}

.custom-datepicker-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #eee;
}

.custom-datepicker-action-btn {
    background: none;
    border: 1px solid #ddd;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
}

    .custom-datepicker-action-btn:hover {
        background: linear-gradient(90deg, rgba(52, 89, 230, 0.1), rgba(47, 179, 128, 0.1));
        border-color: var(--bs-primary);
        color: var(--bs-primary);
    }


.custom-datepicker-day-selected {
    background: linear-gradient(90deg, rgba(25, 118, 210, 0.2), rgba(47, 179, 128, 0.2));
    color: var(--bs-primary);
}

.custom-datepicker-day:hover,
.custom-datepicker-nav-btn:hover,
.custom-datepicker-action-btn:hover {
    background: linear-gradient(90deg, rgba(25, 118, 210, 0.1), rgba(47, 179, 128, 0.1));
    color: var(--bs-primary);
}

.custom-datepicker-input:hover,
.custom-datepicker-input:focus-within {
    background: linear-gradient(90deg, rgba(25, 118, 210, 0.1), rgba(47, 179, 128, 0.1));
    color: var(--bs-primary);
}

/* --------------------------- For Shift Scheduler -------------------------*/
.shift-scheduler {
    font-family: sans-serif;
}

.scheduler-header {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 8px;
    gap: 12px;
}

.scheduler-table {
    width: 100%;
    border-collapse: collapse;
}

    .scheduler-table th,
    .scheduler-table td {
        border: 1px solid #ddd;
        padding: 6px;
        text-align: center;
        vertical-align: top;
    }

    .scheduler-table th {
        background-color: #f9f9f9;
        font-weight: bold;
    }

.shift-block {
    padding: 2px 6px;
    margin: 2px 0;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
}

.add-btn {
    margin-top: 4px;
    font-size: 0.7rem;
    padding: 2px 4px;
    border: 1px solid #ccc;
    background: #ffef61 ;
    cursor: pointer;
}

hr {
    margin: 0 !important; 
    color: inherit;
    border: 0;
    border-top: var(--bs-border-width) solid;
    opacity: .25;
}

.tabs-container {
    display: flex;
    align-items: center;
    background-color: #fff;
    overflow-x: auto;
    white-space: nowrap;
    height: 2.54rem;
}

.tab-item {
    min-width: 180px;
    justify-content: space-between;
    display: flex;
    align-items: center;
    padding: 0rem 0.6rem;
    background-color: transparent;
    color: #5f6368;
    opacity: 0.75;
    border: 1px solid #ddd;
    border-bottom: 1px solid transparent; /* flat bottom */
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: background-color 0.2s, color 0.2s;
    height: 2.54rem;
    position: relative;
}

.tab-item:hover {
    background-color: #f1f1f1;
    opacity: 1;
}

.tab-item.active {
    background-color: #fff;
    color: #202124;
    opacity: 1;
    border-bottom: 1px solid #fff; /* blend with content */
    font-weight: 500;
    z-index: 1;
}

.tab-item .btn-close {
    margin-left: 0.5rem;
    width: 1.25rem;        /* larger hit area */
    height: 1.25rem;
    padding: 0;            /* no icon scaling */
    font-size: 0.7rem;     /* icon stays small */
    color: #aaa;
    opacity: 0.7;
    transition: color 0.2s, opacity 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tab-item .btn-close:hover {
    color: #f44336;
    opacity: 1;
}

.tab-title {
    max-width: 190px;        /* tweak to taste */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
    vertical-align: middle;
}

.tab-left {
    display: flex;
    align-items: center;   /* THIS fixes vertical alignment */
    gap: 0.25rem;
    min-width: 0;
}

.unsaved-dot {
    margin-right: 0.25rem;
    font-size: 1.4rem;
}

.unsaved-warning {
    margin-top: 0.25rem;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

.unsaved-close-popover-global {
    position: fixed;
    top: 4.5rem;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: 0.375rem;
    padding: 0.5rem 0.75rem;
    min-width: 260px;
    z-index: 2000;
}

.add-tab-btn {
    flex-shrink: 0;
    padding: 0.3rem 0.6rem;
    background-color: transparent;
    border: none;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.sf-mono {
    font-family: "SF Mono", Consolas, Menlo, Monaco, monospace, "Droid Sans Mono", "monospace", monospace;
    font-feature-settings: "liga" 0, "calt" 0;
}

.edit-profile-header {
    position: sticky;
    top: 0;
    z-index: 2;
    background: white;
    border-bottom: 1px solid #bbb;
}

footer {
    background: #222;
    color: #bbb;
    padding: 2rem 1rem;
}

    footer a {
        color: #bbb;
        margin-left: 1rem;
    }

        footer a:hover {
            color: white;
            text-decoration: underline;
        }

