/* Custom Select Styles - Matching datepicker input styles */
.custom-select-wrapper {
    position: relative;
    user-select: none;
    width: 100%;
}

.labelSuche {
    width: 115px;
}

@media (min-width: 1400px) {
    .labelSuche {
        width: auto;
    }
}

@media (min-width: 768px) {
    .custom-select-wrapper {
        width: 250px;
    }
}

@media (min-width: 1640px) {
    .custom-select-wrapper {
        width: 300px;
    }

}

.custom-select-trigger {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 3px;
    padding: 0.5rem 15px;
    font-size: 1rem;
    font-weight: 300;
    color: #333;
    background: #fff;
    border: 1px solid #c2c2c2;
    cursor: pointer;
    min-height: 38px;
    width: 100%;
    box-sizing: border-box;
}

/* Match datepicker input styles - ensure border and appearance match */
/* .custom-select-trigger:focus {
    border-color: #ced4da;
    outline: none;
} */

.custom-select-trigger:hover {
    border-color: #adb5bd;
}

.custom-select-trigger:after {
    content: "";
    display: block;
    width: 6px;
    height: 6px;
    border-bottom: 2px solid #333;
    border-right: 2px solid #333;
    transform: rotate(45deg);
    margin-left: 10px;
    transition: transform 0.2s;
    flex-shrink: 0;
}

.custom-select-wrapper.open .custom-select-trigger:after {
    transform: rotate(-135deg);
}

.custom-options {
    position: absolute;
    display: block;
    top: 100%;
    left: 0;
    right: 0;
    border: 1px solid #c2c2c2;
    border-top: 0;
    background: #fff;
    transition: all 0.2s;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    z-index: 100;
    max-height: 300px;
    overflow-y: auto;
    box-sizing: border-box;
}

.custom-select-wrapper.open .custom-options {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
}

.custom-option {
    position: relative;
    display: flex;
    align-items: center;
    padding: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
}

.custom-option:hover {
    background-color: #f8f9fa;
}

.custom-option.selected {
    background-color: #e9ecef;
}

.custom-option input[type="checkbox"] {
    margin-right: 10px;
}

/* Overlay to close when clicking outside */
.custom-select-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99;
    display: none;
}

.custom-select-wrapper.open .custom-select-overlay {
    display: block;
}

/* Disabled state for custom select */
.custom-select-wrapper.disabled .custom-select-trigger {
    cursor: not-allowed;
    opacity: 0.6;
    background-color: #f5f5f5;
}

.custom-select-wrapper.disabled .custom-select-trigger:hover {
    border-color: #c2c2c2;
}

/* Datepicker toggle width animation */
.datepicker-toggle {
    width: 115px;
    transition: width 0.2s ease;
}

.datepicker-toggle.has-value {
    width: 140px;
    white-space: nowrap;
}

/* Custom Tooltip Styles */
.custom-tooltip-wrapper {
    position: relative;
    display: inline-block;
    cursor: help;
    margin-left: 4px;
    vertical-align: middle;
}

.custom-tooltip-trigger {
    display: inline-block;
    cursor: help;
    vertical-align: middle;
}

.custom-tooltip {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    z-index: 10000;
    min-width: 280px;
    max-width: 400px;
    white-space: normal;
    background: #fff;
    border: 1px solid #d0d0d0;
    border-radius: 8px;
    padding: 14px 18px;
    font-size: 0.875rem;
    line-height: 1.5;
    color: #333;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12), 0 1px 3px rgba(0, 0, 0, 0.08);
    text-align: left;
    word-wrap: break-word;
}

.custom-tooltip-wrapper:hover .custom-tooltip,
.custom-tooltip-wrapper.active .custom-tooltip {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
}

/* Triangle pointer at bottom center */
.custom-tooltip::before {
    content: "";
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid #fff;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

/* Triangle border */
.custom-tooltip::after {
    content: "";
    position: absolute;
    bottom: -9px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 9px solid transparent;
    border-right: 9px solid transparent;
    border-top: 9px solid #d0d0d0;
    z-index: -1;
}
