/* Modern Search Loading Animation */
.search-loading-item {
    border: none !important;
    background: transparent !important;
    padding: 20px 15px !important;
}

.search-loading-container {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 12px;
}

.search-loading-animation {
    display: flex;
    gap: 6px;
    align-items: center;
}

.search-pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: linear-gradient(135deg, #007bff, #0056b3);
    animation: searchPulse 1.4s ease-in-out infinite both;
    box-shadow: 0 2px 4px rgba(0, 123, 255, 0.3);
}

.search-pulse-dot:nth-child(1) {
    animation-delay: -0.32s;
}

.search-pulse-dot:nth-child(2) {
    animation-delay: -0.16s;
}

.search-pulse-dot:nth-child(3) {
    animation-delay: 0s;
}

@keyframes searchPulse {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1.2);
        opacity: 1;
        box-shadow: 0 4px 8px rgba(0, 123, 255, 0.5);
    }
}

.search-loading-text {
    font-size: 14px;
    color: #6c757d;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-align: center;
    animation: searchTextFade 2s ease-in-out infinite;
}

@keyframes searchTextFade {
    0%, 100% {
        opacity: 0.7;
    }
    50% {
        opacity: 1;
    }
}

/* Dark mode support for search animations */
@media (prefers-color-scheme: dark) {
    .search-pulse-dot {
        background: linear-gradient(135deg, #4dabf7, #228be6);
        box-shadow: 0 2px 4px rgba(77, 171, 247, 0.3);
    }
    
    .search-pulse-dot:nth-child(2):hover {
        box-shadow: 0 4px 8px rgba(77, 171, 247, 0.5);
    }
    
    .search-loading-text {
        color: #adb5bd;
    }
    
    .search-no-result-text, .search-error-text {
        color: #e9ecef;
    }
    
    .search-no-result-icon {
        color: #adb5bd;
    }
    
    /* Dark mode for search results */
    #search-result-list {
        background: #1a1a1a;
    }
    
    .search-result-container {
        background: #2d3748;
    }
    
    .search-result-container:hover {
        background-color: #343a40;
        border-left-color: #4dabf7;
        box-shadow: 0 2px 8px rgba(77, 171, 247, 0.25);
    }
    
    .search-results-header {
        background: #2d3748 !important;
        border-left-color: #48bb78;
        border-bottom: none !important;
    }
    
    .search-no-result-container {
        background: #2d3748;
        border-left-color: #f6e05e;
    }
    
    .search-error-container {
        background: #2d3748;
        border-left-color: #fc8181;
    }
    
    .search-result-link {
        color: #e9ecef !important;
    }
    
    .search-result-link:hover {
        color: #4dabf7 !important;
    }
    
    .search-result-preview {
        color: #adb5bd;
    }
    
    .search-result-type {
        background: #495057;
        color: #e9ecef;
    }
    
    .search-result-id {
        color: #adb5bd;
    }
    
    .search-result-item {
        margin-bottom: 1px;
    }
    
    .search-results-count {
        color: #adb5bd;
    }
    
    .search-results-count i {
        color: #4dabf7;
    }
    
    .search-result-container:focus-within {
        background-color: #1e3a5f;
        border-left-color: #4dabf7;
    }
    
    /* Dark mode for ajax notifications */
    .header-search .ajax-notifications {
        background: #2d3748;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    }
    
    .header-search .notification-body li {
        background: #2d3748;
        border-bottom-color: #495057;
    }
    
    .header-search .notification-body li:hover {
        background-color: #343a40;
        border-left-color: #4dabf7;
    }
    
    .header-search .notification-body li a {
        color: #e9ecef;
    }
    
    .header-search .notification-body li a:hover {
        color: #4dabf7;
    }
}

/* Responsive design for search results */
@media (max-width: 768px) {
    .search-result-container {
        padding: 10px 12px;
    }
    
    .search-result-header {
        gap: 8px;
    }
    
    .search-result-icon {
        font-size: 14px;
        min-width: 18px;
    }
    
    .search-result-title {
        font-size: 13px;
    }
    
    .search-result-content {
        margin: 4px 0 6px 26px;
    }
    
    .search-result-preview {
        font-size: 12px;
        max-height: 30px;
    }
    
    .search-result-meta {
        margin-left: 26px;
        gap: 8px;
        flex-wrap: wrap;
    }
    
    .search-result-type {
        font-size: 10px;
        padding: 1px 4px;
    }
    
    .search-result-id {
        font-size: 10px;
    }
}

/* Enhanced search result styling */
#search-result-list {
    max-height: 800px;
    overflow-y: auto;
    overflow-x: hidden;
    width: 100%;
    box-sizing: border-box;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 8px;
}

#search-result-list::-webkit-scrollbar {
    width: 6px;
}

#search-result-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

#search-result-list::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

#search-result-list::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Modern Search Result Items */
.search-result-item {
    border: none !important;
    background: transparent !important;
    padding: 4px 8px !important;
    margin: 0 !important;
    border-bottom: none !important;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.search-result-item:last-child {
    border-bottom: none !important;
}

/* Search Results Header */
.search-results-header {
    border: none !important;
    background: #ffffff !important;
    padding: 10px 16px !important;
    margin: 0 0 4px 0 !important;
    border-bottom: none !important;
    border-radius: 6px;
    border-left: 3px solid #28a745;
}

.search-results-count {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
    color: #495057;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.search-results-count i {
    color: #007bff;
}

.search-result-container {
    padding: 12px 16px;
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
    box-sizing: border-box;
    width: 100%;
    background: #ffffff;
    border-radius: 6px;
    margin-bottom: 2px;
}

.search-result-container:hover {
    background-color: #f1f8ff;
    border-left: 3px solid #007bff;
    padding-left: 19px;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.15);
    transform: translateY(-1px);
}

.search-result-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

/* When no icon is present, remove the gap */
.search-result-header.no-icon {
    gap: 0;
}

.search-result-icon {
    font-size: 16px;
    color: #007bff;
    min-width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.search-result-icon.config-icon {
    color: #28a745;
}

.search-result-link {
    color: #212529 !important;
    text-decoration: none !important;
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    pointer-events: none; /* Prevent double-click handling since container is clickable */
}

.search-result-container:hover .search-result-link {
    color: #007bff !important;
}

.search-result-title {
    font-weight: 500;
    font-size: 14px;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: calc(100% - 40px);
}

.search-result-external {
    font-size: 12px;
    color: #6c757d;
    opacity: 0.7;
}

.search-result-content {
    margin: 6px 0 8px 30px;
}

.search-result-preview {
    font-size: 13px;
    color: #6c757d;
    line-height: 1.4;
    display: block;
    max-height: 40px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-result-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: 30px;
    font-size: 11px;
}

.search-result-type {
    background: #e9ecef;
    color: #495057;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.search-result-id {
    color: #6c757d;
    font-family: 'Courier New', monospace;
}

/* Animation for new results */
.search-result-item {
    animation: searchResultFadeIn 0.3s ease-out;
}

@keyframes searchResultFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Keyboard navigation support */
.search-result-container:focus-within {
    background-color: #e3f2fd;
    border-left: 3px solid #007bff;
    padding-left: 19px;
    outline: none;
}

/* Better focus indicators */
.search-result-link:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
    border-radius: 2px;
}

/* Search result items hover effect - updated selector */
#search-result-list li:not(.search-loading-item):not(.search-no-result-item):not(.search-error-item):not(.search-result-item):not(.search-results-header) {
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

#search-result-list li:not(.search-loading-item):not(.search-no-result-item):not(.search-error-item):not(.search-result-item):not(.search-results-header):hover {
    background-color: #f8f9fa;
    border-left-color: #007bff;
    transform: translateX(2px);
}

/* No Result Styling */
.search-no-result-item {
    border: none !important;
    background: transparent !important;
    padding: 20px 15px !important;
}

.search-no-result-container {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 8px;
    background: #ffffff;
    border-radius: 6px;
    padding: 24px;
    border-left: 3px solid #ffc107;
}

.search-no-result-icon {
    font-size: 24px;
    color: #6c757d;
    opacity: 0.7;
}

.search-no-result-text {
    font-size: 14px;
    color: #495057;
    font-weight: 500;
    text-align: center;
}

.search-no-result-hint {
    font-size: 12px;
    color: #6c757d;
    text-align: center;
    margin: 0;
}

/* Error Styling */
.search-error-item {
    border: none !important;
    background: transparent !important;
    padding: 20px 15px !important;
}

.search-error-container {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 8px;
    background: #ffffff;
    border-radius: 6px;
    padding: 24px;
    border-left: 3px solid #dc3545;
}

.search-error-icon {
    font-size: 24px;
    color: #dc3545;
    opacity: 0.8;
}

.search-error-text {
    font-size: 14px;
    color: #dc3545;
    font-weight: 500;
    text-align: center;
}

.search-error-details {
    font-size: 12px;
    color: #6c757d;
    text-align: center;
    margin: 0;
}

div.validation-summary-valid {
    display: none;
}
.dataCell {
    white-space: nowrap;
}
th.dt-head-right {
    text-align: right !important;
}
table.dataTable thead th.sorting,
table.dataTable thead th.sorting_asc,
table.dataTable thead th.sorting_desc {
    background: none;

}
table.dataTable tbody td.button-column {
    padding: 0px !important;
}
.text-danger {
    color: #b94a48 !important;
}

.text-primary {
    color: #3276b1 !important;
}

.text-success {
    color: #468847 !important;
}

.text-info {
    color: #346597 !important;
}

.text-warning {
    color: #c09853 !important;
}

.text-muted {
    color: #999 !important;
}

.text-brixxlite {
    color: #79B5BB !important;
}

.text-brixxdark {
    color: #006E7E !important;
}

/*Falls selected: Die Schriftfarbe weiss lassen, da sonst nicht zu erkennen*/
tr.selected .text-danger,
tr.selected .text-primary,
tr.selected .text-danger,
tr.selected .text-success,
tr.selected .text-info,
tr.selected .text-warning,
tr.selected .text-muted {
    color: white !important;
}

.badge-tag {
    padding: 1px 9px 2px;
    margin-right: 2px;
    font-size: 12.025px;
    font-weight: bold;
    white-space: nowrap;
    color: #ffffff;
    background-color: #999999;
    -webkit-border-radius: 9px;
    -moz-border-radius: 9px;
    border-radius: 9px;
}

    .badge-tag:hover {
        color: #ffffff;
        text-decoration: none;
        cursor: pointer;
    }

.badge-tag-error {
    background-color: #b94a48;
}

    .badge-tag-error:hover {
        background-color: #953b39;
    }

.badge-tag-warning {
    background-color: #f89406;
}

    .badge-tag-warning:hover {
        background-color: #c67605;
    }

.badge-tag-success {
    background-color: #468847;
}

    .badge-tag-success:hover {
        background-color: #356635;
    }

.badge-tag-info {
    background-color: #3a87ad;
}

    .badge-tag-info:hover {
        background-color: #2d6987;
    }

.badge-tag-inverse {
    background-color: #333333;
}

    .badge-tag-inverse:hover {
        background-color: #1a1a1a;
    }
.video-mirror {
    transform: rotateY(180deg);
    -webkit-transform: rotateY(180deg);
    -moz-transform: rotateY(180deg);
}

.wiki-info-btn {
    width: 30px;
    height: 30px;
    text-align: center;
    padding: 6px 0;
    font-size: 12px;
    line-height: 1.42;
    border-radius: 15px;
}

.brixx-control-center-checkbox {
    padding: 6px 12px;
}

.btn .brixx-badge {
    position: absolute !important;
    right: 5px !important;
    top: 18px !important;
    background-color: #999;
    font-size: 12px !important;
}

.btn:active > .brixx-badge {
    top: -10px !important;
    right: -13px !important;
}
.nav-tabs > li > a .badge {
    margin: 0;
}

.brixx-mandatory {
    background: inherit;
    color: red;
    /*position: absolute !important;*/
}

.input-group .select2-container {
    position: relative;
    /*z-index: 2;*/
    float: left;
    width: 100%;
    margin-bottom: 0;
    display: table;
    table-layout: fixed;
}
.menu-on-top #firstStaticMenu{
    margin-left: 20px;
}
body:not(.menu-on-top) #firstStaticMenu {
    margin-top: 20px;
}
#blockerOverlay {
    background-color: rgba(0, 0, 0, 0.2);
    z-index: 99999;
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    display: none;
}

.dt-body-center {
    text-align: center;
}

.concurrent-user-icon {
    position: absolute;
    top: 50px;
    right: 10px;
}

.dev-mode-for-apps {
    background-color: red;
}

.readonly-form-title:before {
    font-family: "Font Awesome 5 Free";
    font-weight: 600;
    content: "\f023";
    margin-right: 2px;
}

.readonly-form-title-observer:before {
    font-family: "Font Awesome 5 Free";
    font-weight: 600;
    content: "\f502";
    margin-right: 2px;
}


li.isEditor:after {
    font-family: "Font Awesome 5 Free";
    font-weight: 600;
    content: "\f044";
    margin-left: 5px;
}

li.isViewer:after {
    font-family: "Font Awesome 5 Free";
    font-weight: 600;
    content: "\f1e5";
    margin-left: 5px;
}

.custom-footer {
    background: #2a2725;
    border-top: 1px solid #cecece;
    bottom: 0;
    display: block;
    height: 52px;
    padding: 15px 13px 0;
    padding-left: 233px;
    position: absolute;
    width: 100%;
}

/* Verbesserte Header-Suche Stile */
.rounded-search {
    margin-left: 0;
    position: relative;
}

.search-container {
    display: flex;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 2px 5px;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin-top: 6px;
    position: relative;
}

.search-container:hover, .search-container:focus-within {
    background-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}

.search-input {
    background: transparent;
    border: none;
    color: #fff;
    padding: 6px 10px;
    width: 350px;
    outline: none;
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.search-button {
    background: transparent;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 6px 8px;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.search-button:hover {
    background-color: rgba(255, 255, 255, 0.15);
}

.cancel-button {
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    font-size: 14px;
    padding: 6px;
    transition: all 0.2s ease;
}

.cancel-button:hover {
    color: #fff;
}

/* Sucherergebnis-Dropdown verbesserte Stile */
.header-search .ajax-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 625px;
    min-width: 550px;
    max-width: calc(100vw - 40px);
    max-height: 95vh !important;
    height: auto !important;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(0, 0, 0, 0.1);
    overflow: hidden;
    z-index: 1000;
    display: none;
    margin-top: 5px;
    /* Shift dropdown to the left to prevent overflow */
    transform: translateX(-200px);
    left: 195px;
}

/* Close button for search results */
.search-results-header-controls {
    position: absolute;
    top: 8px;
    right: 25px;
    z-index: 1001;
}

.search-results-close-btn {
    background: unset;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #666;
    font-size: 12px;
    transition: all 0.2s ease;
}

.search-results-close-btn:hover {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
    transform: scale(1.1);
}

/* Responsive positioning for smaller screens */
@media (max-width: 1200px) {
    .header-search .ajax-dropdown {
        transform: translateX(-300px);
        width: 500px;
        min-width: 450px;
        max-height: 90vh !important;
        height: auto !important;
    }
}

@media (max-width: 768px) {
    .header-search .ajax-dropdown {
        transform: translateX(-250px);
        width: 350px;
        min-width: 300px;
        max-height: 85vh !important;
        height: auto !important;
    }
}

.header-search .ajax-dropdown.show {
    display: block;
}

.header-search .ajax-notifications {
    padding: 0;
    margin: 0;
    max-height: 95vh;
    overflow-y: auto;
    overflow-x: hidden;
    background: #ffffff !important;
    border: none !important;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    /* Eigene Scrollbar-Stile ohne Konflikt mit custom-scroll */
    scrollbar-width: thin;
    scrollbar-color: #ccc transparent;
}

.header-search .ajax-notifications::-webkit-scrollbar {
    width: 6px;
}

.header-search .ajax-notifications::-webkit-scrollbar-track {
    background: transparent;
}

.header-search .ajax-notifications::-webkit-scrollbar-thumb {
    background-color: #ccc;
    border-radius: 3px;
}

.header-search .ajax-notifications::-webkit-scrollbar-thumb:hover {
    background-color: #999;
}

.header-search .ajax-notifications {
    height: 100%;
    display: flex;
}

.header-search .notification-body {
    padding: 0;
    margin: 0;
    list-style: none;
    width: 100%;
    height: 100%;
}

.header-search .notification-body li {
    border-bottom: 1px solid #e9ecef;
    transition: background-color 0.2s ease;
    margin: 0;
    padding: 0;
    width: 100%;
    display: block;
    background: #ffffff;
}

.header-search .notification-body li:last-child {
    border-bottom: none;
}

.header-search .notification-body li:hover {
    background-color: #f1f8ff;
    border-left: 3px solid #007bff;
    padding-left: 3px;
}

.header-search .notification-body li a {
    display: block;
    padding: 12px 16px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    line-height: 1.4;
    width: 100%;
    box-sizing: border-box;
    border: none;
    background: none;
}

.header-search .notification-body li a:hover {
    color: #007bff;
    background-color: transparent;
    text-decoration: none;
}

.header-search .notification-body li a:focus {
    outline: none;
    background-color: #e3f2fd;
}

/* Leer-Zustand Styling */
.header-search .notification-body:empty::after {
    content: "Keine Ergebnisse gefunden";
    display: block;
    padding: 20px 16px;
    text-align: center;
    color: #999;
    font-style: italic;
}

/* Loading-Zustand */
.header-search .notification-body.loading::after {
    content: "Suche läuft...";
    display: block;
    padding: 20px 16px;
    text-align: center;
    color: #666;
}

.select2-search--dropdown.select2-search--hide {
    display: none;
}

.select2-container--default .select2-results > .select2-results__options {
    max-height: 200px;
    overflow-y: auto;
}

/* Zusätzliche Stile für bessere Dropdown-Darstellung */
.header-search {
    position: relative;
}
.smart-style-7 .modal-content {
    background: url(../img/mybg.png) #fff;
}

.panel-primary.bxgroupbox {
    border-color: #3276b1;
    border-radius: 11px;
}
.panel-primary > .panel-heading.bxgroupbox {
    background-color: #3276b1;
    padding: 10px 15px;
    border-bottom: 1px solid transparent;
    border-top-left-radius: 11px;
    border-top-right-radius: 11px;
    padding: 10px 15px;
}

.wb-header #modalBrixxboxToolbar {
    padding-top: 2px;
}

.wb-body #modalBrixxboxToolbar {
    display: none;
}

.wb-body .panel-body {
    border-color: #3276b1;
    border-bottom-color: #ddd;
    border-radius: 11px;
}
.wb-body .modal-body {
    padding: 10px;
}

.wb-body .modal-content {
    border-bottom-style: none;
    box-shadow: none;
}

.wb-control {
    padding-right: 6px;
}

.modal-dialog .wb-control * {
    width: auto !important;
    height: initial !important;
}

.wb-pin {
    padding-top: 8px !important;
}

.winbox-header {
    border-radius: 4px 4px 0 0;
}

.wb-body {
    border-radius: 0 0 4px 4px;
}

.iconpicker-popover {
    z-index: 999 !important;
}
.dataCell .DTE_Field_InputControl > * {
    color: black;
}

/*Falls eine datenzelle editiert werden kann, mindestbreite setzen. Damit hat auch ein leeres Feld einen clickbaren bereich */
.dataCell .mouse-hover-pointer {
    display: inline-block;
    min-width: 100%;
}

.dataCell .mouse-hover-pointer:hover {
    border: 1px solid lightgrey;
    cursor:pointer;
}

#bp-web-widget {
    right: 3px;
    bottom: 0px;
}
.bp-web-widget {
    width: 53px !important;
}

#prevVersionBtn {
    opacity: 0.4;
}

#testVersion {
    margin-left: 0px;
}

#testVersionBtn {
    opacity: 0.3;
}
