html {
    font-size: 14px;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
    position: relative;
    min-height: 100%;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

.interaction-bar span {
    margin-right: 15px;
    font-size: 0.95rem;
    color: #555;
}

.comment img {
    border: 1px solid #ccc;
}

.comment p {
    margin: 0;
    font-size: 0.95rem;
}

.profile-img-header {
    width: 30px;
    height: 30px;
    object-fit: cover;
    border-radius: 50%;
}

header .navbar-nav .dropdown-menu {
    margin-top: 0.5rem;
}

header .dropdown-menu {
    min-width: 10rem;
}

header .dropdown-item {
    padding: 0.5rem 1rem;
}

img, video {
    transition: transform 0.3s;
}

    img:hover, video:hover {
        transform: scale(1.05);
    }

.mobile-tabs {
    position: fixed;
    bottom: 0;
    width: 100%;
    background: #f8f9fa;
    display: flex;
    justify-content: space-around;
    border-top: 1px solid #ccc;
    z-index: 1000;
}

    .mobile-tabs a {
        padding: 10px;
        text-align: center;
        flex: 1;
        text-decoration: none;
        color: #333;
        font-size: 12px;
    }

        .mobile-tabs a:hover {
            background: #e2e6ea;
        }

.admin-sidebar {
    width: 250px;
    position: fixed;
    left: -250px; /* hide by default */
    top: 60px;
    height: 100%;
    background: white;
    z-index: 1050;
    overflow-y: auto;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
    transition: left 0.3s ease;
}

    .admin-sidebar.open {
        left: 0;
    }
header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
}
@media (max-width: 768px) {
    .chat-main {
        display: flex;
        flex-direction: column;
        /* or whatever fits your layout */
    }

    .chat-messages {
        flex: 1;
        overflow-y: auto;
        padding: 1rem;
    }

    .bottom-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 60px;
        background: #fff;
        border-top: 1px solid #ccc;
        display: flex;
        justify-content: space-around;
        align-items: center;
        z-index: 1051;
    }

        .bottom-nav a {
            text-decoration: none;
            color: #555;
            font-size: 13px;
            display: flex;
            flex-direction: column;
            align-items: center;
        }

    body {
        margin-top: 60px; /* ensures page content not hidden behind nav */
    }

    header {
        position: fixed;
        top: 0;
        width: 100%;
        z-index: 1000;
    }

        header .navbar-nav .dropdown-menu {
            right: 0;
            left: auto;
            position: absolute;
        }
}

@media (max-width: 374.98px) {
    .custom-xs-grid > .col-6 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

@media (max-width: 424.98px) {
    .custom-sm-grid > .col-6 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}
.gallery-title {
    text-align: center;
    margin-bottom: 20px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
    padding: 0 16px;
}

.gallery-item {
    border: 1px solid #ddd;
    padding: 10px;
    border-radius: 8px;
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: transform 0.2s;
}

    .gallery-item:hover {
        transform: scale(1.02);
    }

.gallery-media {
    width: 100%;
    height: auto;
    border-radius: 5px;
    object-fit: cover;
    max-height: 220px;
}

.media-caption {
    text-align: center;
    margin-top: 8px;
    font-size: 0.95rem;
    color: #333;
}

/* Responsive tweaks */
@media (max-width: 600px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }

    .gallery-media {
        max-height: 180px;
    }

    .media-caption {
        font-size: 0.85rem;
    }
}
/* Keep modal inside viewport */
#globalCropModal .modal-dialog {
    max-width: 90vw; /* no wider than viewport */
    max-height: 80vh; /* no taller than viewport */
    margin: auto; /* center it */
}

#globalCropModal .modal-content {
    height: 100%;
}

#globalCropModal .modal-body {
    height: calc(80vh - 100px); /* leave space for header/footer */
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden; /* prevent scrollbars inside */
}

.img-container {
    width: 100%;
    height: 100%;
    position: relative;
}

#globalCropImage {
    max-width: 100%;
    max-height: 100%;
    display: block;
}
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.gallery-card {
    display: flex;
    flex-direction: column;
    border: 1px solid #ddd;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    transition: transform 0.2s ease;
}

    .gallery-card:hover {
        transform: translateY(-4px);
    }

.gallery-preview {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    background: #000;
    overflow: hidden;
}

.gallery-media {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
}

.video-play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 40px;
    color: white;
    text-shadow: 0px 0px 10px rgba(0,0,0,0.7);
    pointer-events: none;
}

.gallery-caption {
    padding: 10px;
}

.media-name {
    font-weight: 600;
    margin: 0;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.media-type {
    font-size: 0.8rem;
    color: #666;
    margin: 0;
}

.gallery-actions {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    border-top: 1px solid #eee;
}
#imgInModal {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
}

/* Fancy toggle-style checkbox */
.custom-checkbox {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

    .custom-checkbox input {
        opacity: 0;
        width: 0;
        height: 0;
    }

.custom-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 26px;
}

    .custom-slider:before {
        position: absolute;
        content: "";
        height: 20px;
        width: 20px;
        left: 3px;
        bottom: 3px;
        background-color: white;
        transition: 0.4s;
        border-radius: 50%;
        box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    }

.custom-checkbox input:checked + .custom-slider {
    background-color: #4caf50;
}

    .custom-checkbox input:checked + .custom-slider:before {
        transform: translateX(24px);
    }

/* Optional hover effect */
.custom-checkbox:hover .custom-slider {
    background-color: #66bb6a;
}

#consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #fff;
    border-top: 1px solid #ddd;
    padding: 16px;
    box-shadow: 0 -2px 6px rgba(0,0,0,0.1);
    display: none;
    z-index: 10000;
    font-family: Arial, sans-serif;
}

#consent-banner p {
    margin: 0 0 10px 0;
    font-size: 14px;
    color: #333;
}

#consent-banner .actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

#consent-banner button {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

#consent-accept {
    background-color: #007bff;
    color: white;
}

#consent-manage {
    background-color: #f1f1f1;
    color: #333;
}

/* Optional hover styles */
#consent-accept:hover {
    background-color: #0056b3;
}

#consent-manage:hover {
    background-color: #ddd;
}

input[readonly].disabled {
    background-color: #e9ecef; /* light grey background */
    color: #6c757d; /* muted text color */
    cursor: not-allowed; /* show disabled cursor */
    pointer-events: none; /* block mouse actions (optional) */
}