﻿@import url('open-iconic/font/css/open-iconic-bootstrap.min.css');

/* Remove default anchor styling */
a.no-style {
    color: inherit;
    text-decoration: none;
}

    a.no-style:hover {
        color: inherit;
        text-decoration: none;
    }

/* Back to top button styling */
.btn-back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1040; /* Below modals but above most content */
    border-radius: 50%;
    width: 48px;
    height: 48px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    min-width: 48px;
    min-height: 48px;
    opacity: 0;
    visibility: hidden;
}

    .btn-back-to-top.show {
        opacity: 1;
        visibility: visible;
    }

    .btn-back-to-top:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    }

    .btn-back-to-top i {
        font-size: 16px;
        line-height: 1;
    }

/* Enhanced collapse animation for entity reorder lists */
.entity-collapse {
    transition: height 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.3s ease, padding 0.3s ease, margin 0.3s ease;
    overflow: hidden;
}

    .entity-collapse.show {
        height: auto !important;
        opacity: 1;
    }

    .entity-collapse:not(.show) {
        height: 0 !important;
        opacity: 0;
        padding-top: 0 !important;
        padding-bottom: 0 !important;
        margin-top: 0 !important;
        margin-bottom: 0 !important;
    }

.entity-collapsing {
    transition: height 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.3s ease;
    overflow: hidden;
}


.accordion {
    --bs-accordion-border-color: var(--bs-primary);
    --bs-accordion-btn-bg: var(--bs-secondary);
    --bs-accordion-btn-padding-x: 0.65rem;
    --bs-accordion-btn-padding-y: 0.65rem;
    --bs-accordion-bg: var(--bs-gray-dark);
    --bs-accordion-active-bg: var(--bs-success-bg-subtle);
}

    .accordion .accordion-secondary {
        --bs-accordion-border-color: var(--bs-primary-border-subtle);
        --bs-accordion-btn-bg: var(--bs-secondary);
        --bs-accordion-btn-padding-x: 0.75rem;
        --bs-accordion-btn-padding-y: 0.75rem;
        --bs-accordion-bg: var(--bs-gray-dark);
        --bs-accordion-active-bg: var(--bs-info-bg-subtle);
    }

.accordion-body {
    --bs-accordion-body-padding-x: 0.65rem;
    --bs-accordion-body-padding-y: 0.65rem;
}

.dragging-highlight {
    background-color: rgba(13, 110, 253, 0.2); /* soft bootstrap primary blue */
    border-left: 3px solid #0d6efd;
    transition: background-color 0.15s ease;
}

/* Animation for newly added entities */
@keyframes highlightFadeIn {
    0% {
        background-color: rgba(255, 193, 7, 0.8);
        border-color: #ffc107;
        transform: scale(1.02);
        box-shadow: 0 4px 15px rgba(255, 193, 7, 0.4);
    }

    50% {
        background-color: rgba(255, 193, 7, 0.6);
        border-color: #ffc107;
        transform: scale(1.01);
        box-shadow: 0 2px 10px rgba(255, 193, 7, 0.3);
    }

    100% {
        background-color: transparent;
        border-color: transparent;
        transform: scale(1);
        box-shadow: none;
    }
}

.newly-added-entity {
    animation: highlightFadeIn 3s ease-out forwards;
    border: 2px solid transparent;
    border-radius: 4px;
    transition: all 0.3s ease;
}


/* Add this CSS for highlighting newly added entities */
.newly-added-highlight {
    background-color: rgba(255, 193, 7, 0.3) !important;
    transition: background-color 0.3s ease;
    border: 2px solid #ffc107 !important;
    border-radius: 4px;
}

/* Responsive layout for search and checkboxes */
.search-filters-container {
    transition: all 0.3s ease;
}

@media (max-width: 767.98px) {
    .search-filters-container .search-section {
        margin-bottom: 0.75rem;
        width: 100% !important;
    }
    
    .search-filters-container .filters-section {
        width: 100% !important;
        justify-content: flex-start !important;
    }
    
    .search-filters-container .filters-section .form-check {
        margin-right: 1rem;
    }
}

@media (min-width: 768px) {
    .search-filters-container .search-section {
        flex: 1 1 auto;
        margin-bottom: 0;
    }
    
    .search-filters-container .filters-section {
        flex: 0 0 auto;
        justify-content: flex-end !important;
    }
}

/* Enhanced search box styling */
.input-group .input-group-text {
    border-right: 0;
    background-color: var(--bs-body-bg);
    color: var(--bs-text-muted);
}

.input-group .form-control {
    border-left: 0;
}

.input-group .form-control:focus {
    border-left: 0;
    box-shadow: none;
}

.input-group:focus-within .input-group-text {
    border-color: var(--bs-primary);
    color: var(--bs-primary);
}

.input-group:focus-within .form-control {
    border-color: var(--bs-primary);
}

/* Fixed SearchBox width for small screens and above */
@media (min-width: 576px) {
    .search-section .input-group {
        width: 375px !important;
        max-width: 375px;
    }
    
    /* Also apply to modal SearchBox */
    .modal-body .input-group {
        width: 375px !important;
        max-width: 375px;
    }
}

.busy-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,.4);
    z-index: 1050; /* above Bootstrap modals */
}

.feedback-options-additions-summary {
    width: 300px !important;
}

.criteria-range-summary {
    width: 330px !important;
}

.criteria-range {
    width: 100% !important;
}

.table-two-buttons-col {
    width: 80px;
}

.table-three-buttons-col {
    width: 130px;
}

.table-entity-state-col {
    width: 35px;
}

.table-pic-sm-thumbnail-col {
    width: 70px;
}

.pic-sm-thumbnail {
    width: 50px;
}

.pic-md-thumbnail {
    width: 100px;
}

.pic-lg-thumbnail {
    width: 180px;
}

.text-inactive-entity {
    color: var(--bs-indigo) !important;
}

.text-deleted-entity {
    color: var(--bs-gray) !important;
}

.entity-name {
    width: 150px !important;
}



.link:hover {
    cursor: pointer;
    color: var(--bs-link-color);
    text-decoration: underline;
}

.link-bold:hover {
    cursor: pointer;
    color: var(--bs-link-color);
    text-decoration: none;
    font-weight: bold;
}


.link-neutral {
    cursor: pointer;
}


.thumbnail {
    position: relative;
}

.icon-wrap {
    width: 100%;
    height: 100%;
    position: absolute;
    display: flex;
    align-items: left;
    justify-content: left;
}

.text-italic {
    font-style: italic;
}

.row-highlight {
    background-color: var(--bs-table-active-bg);
    color: var(--bs-table-active-color);
}

.row-link:hover {
    cursor: pointer;
    background-color: var(--bs-link-color);
}

.list-group-item.list-group-item-action:hover, .list-group-item-primary.list-group-item-action:focus {
    color: var(--bs-white);
    background-color: var(--bs-gray-900);
}

/* Dark mode toggle button styling */
.btn-dark-mode-toggle {
    transition: all 0.3s ease;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .btn-dark-mode-toggle:hover {
        transform: rotate(180deg);
        box-shadow: 0 2px 8px rgba(255, 255, 255, 0.2);
    }

    .btn-dark-mode-toggle:active {
        transform: rotate(180deg) scale(0.95);
    }

    .btn-dark-mode-toggle i {
        font-size: 16px;
        line-height: 1;
    }

/* Mobile dark mode toggle styling */
.btn-dark-mode-toggle-mobile {
    transition: all 0.3s ease;
}

    .btn-dark-mode-toggle-mobile:hover {
        transform: translateY(-1px);
        box-shadow: 0 2px 8px rgba(255, 255, 255, 0.1);
    }

/* Ensure theme cards are compatible with both light and dark modes */
.theme-card {
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid rgba(var(--bs-border-color-rgb), 0.2);
}

    .theme-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 16px rgba(0,0,0,0.15);
    }

[data-bs-theme="light"] .theme-card:hover {
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}

[data-bs-theme="dark"] .theme-card:hover {
    box-shadow: 0 8px 16px rgba(255,255,255,0.1);
}
