﻿html {
    font-size: 14px;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

html {
    position: relative;
    min-height: 100%;
}

body {
    margin-bottom: 60px;
}

.opaqueLayer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: black;
    opacity: 0.1;
    z-index: 9000;
    transition: all .5s;
    display: none;
}

.popupDelete {
    position: fixed;
    top: 10px;
    left: 50%;
    width: 300px;
    height: 200px;
    background-color: black;
    z-index: 9001;
    display: block;
}

.loader {
    border: 10px solid #f3f3f3;
    border-radius: 50%;
    border-top: 10px solid #3498db;
    width: 80px;
    height: 80px;
    -webkit-animation: spin 2s linear infinite; /* Safari */
    animation: spin 2s linear infinite;
    position: fixed;
    top: 30%;
    left: 45%;
    display: block;
    z-index: 9001;
}

.Message {
    position: fixed;
    top: 85%;
    left: 75%;
    display: none;
    z-index: 1;
    width: 100%;
}

/* Safari */
@-webkit-keyframes spin {
    0% {
        -webkit-transform: rotate(0deg);
    }

    100% {
        -webkit-transform: rotate(360deg);
    }
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.global-search-results {
    position: absolute;
    max-width: 400px; /* Limit width on larger screens */
    width: 100%; /* Still responsive */
    max-height: 250px;
    overflow-y: auto;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.1);
    display: none;
    z-index: 1000;
    padding: 8px;
}

.global-search-card {
    cursor: pointer; /* Make it clear the row is clickable */
    padding: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

    .global-search-card.highlight,
    .global-search-card:hover { /* Ensure hover also triggers highlight */
        background-color: #f0f0f0;
        border-radius: 5px;
    }

    .global-search-card:last-child {
        border-bottom: none;
    }

.global-search-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover; /* Keeps proper aspect ratio */
    max-width: 100%; /* Ensures responsiveness */
    display: block;
}

.global-search-info {
    flex-grow: 1;
}

.global-profile-display {
    text-align: center;
    margin-top: 20px;
}

.global-profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
}

.global-search-container {
    position: relative; /* Ensures `userResults` stays positioned correctly */
    width: 250px; /* Match search box width */
}

.global-search-card.highlight {
    background-color: #f0f0f0;
    border-radius: 5px;
}

/* Ensure proper scaling on mobile */
@media screen and (max-width: 768px) {
    #globalSearchResults {
        max-width: 100%; /* Allow full width on small screens */
        max-height: 200px;
        padding: 6px;
    }

    .global-search-avatar {
        width: 35px;
        height: 35px;
    }

    .global-search-card {
        flex-direction: row;
        align-items: center;
        justify-content: start;
        padding: 8px;
        font-size: 14px; /* Adjust font size */
    }
}

.select2-container {
    width: 100% !important;
}

@media screen and (max-width: 768px) {
    .select2-container {
        font-size: 14px; /* Adjust font size for mobile */
    }
}

.listbox-container {
    min-height: 150px;
    height: 150px;
    overflow-y: auto;
}

.listbox-container-div {
    float: left;
}

.listbox-buttons {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 10px;
    height: 100%;
    float: left;
}

.gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    align-items: center;
    padding: 10px;
    min-height: 150px; /* Ensure it has a default height */
    transition: all 0.3s ease-in-out;
}

.gallery-item img {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
    transition: transform 0.3s ease-in-out;
}

    .gallery-item img:hover {
        transform: scale(1.1);
    }

.chocolat-parent img {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
    transition: transform 0.3s ease-in-out;
}

    .chocolat-parent img:hover {
        transform: scale(1.1);
    }

/* REUSE btn-icon-text for all toolbar buttons */
.btn-icon-text {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    font-size: 0.95rem;
    transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}

    .btn-icon-text i {
        margin-right: 0.5rem;
        font-size: 1.2rem;
    }

/* Create Role button: solid primary */
.btn-primary.btn-icon-text:hover {
    background-color: #0056b3;
    border-color: #0056b3;
}

/* Export buttons: outline variants fill on hover */
.btn-outline-success:hover {
    background-color: #28a745;
    border-color: #28a745;
    color: #fff;
}

.btn-outline-danger:hover {
    background-color: #dc3545;
    border-color: #dc3545;
    color: #fff;
}

/* Ensure tooltips show a pointer */
[action-toolbar] [data-bs-toggle="tooltip"] {
    cursor: pointer;
}

header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030; /* Ensure it's above other content */
}

.main-content {
    margin-top: 5px; /* Adjust based on header height */
}

/* 1) Prevent any parent from trapping fixed children */
.main-wrapper,
.main-content,
.container-fluid,
section {
    transform: none !important;
    filter: none !important;
    perspective: none !important;
    overflow: visible !important;
}

/* 2) Force all of Chocolat’s own elements to fill the viewport on top */
body > .chocolat-wrapper,
body > .chocolat-overlay,
body > .chocolat-container {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 2147483647 !important; /* max 32-bit value */
    background: rgba(0,0,0,0.8) !important;
}

    /* center the image and controls above everything */
    body > .chocolat-wrapper .chocolat-image-wrapper {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        height: 100% !important;
        z-index: 2147483648 !important; /* just above the overlay */
    }

    /* 1) Make the overlay transparent (or adjust opacity/color as you like) */
    body > .chocolat-wrapper .chocolat-overlay {
        background-color: transparent !important;
    }

    /* 2) If you still want a slight tint instead of full transparency:
   background-color: rgba(0, 0, 0, 0.2) !important;
*/

    /* 3) Ensure the container itself doesn’t impose a dark bg */
    body > .chocolat-wrapper .chocolat-container {
        background-color: transparent !important;
    }