/* Custom Select Styling - Optimized (tayercash style) */
.select-hidden {
    display: none !important;
}

.custom-select-wrapper {
    position: relative;
    user-select: none;
    width: 100%;
    min-width: 60px;
    display: block;
    margin: 0;
}

/* التنسيق عند الوجود داخل فورم */
.form-group .custom-select-wrapper {
    width: 100% !important;
    display: block;
    margin: 0;
}

.form-group .custom-select {
    width: 100%;
}

.form-group .custom-select-trigger {
    padding: 10px 15px;
    min-height: 42px;
    font-size: 14px;
}

.custom-select {
    position: relative;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(255, 204, 0, 0.2);
    border-radius: 8px;
    background: #121214;
    transition: border-color 0.2s cubic-bezier(0.4, 0, 0.2, 1), background 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.custom-select:hover {
    border-color: var(--primary-color);
    background: #19191d;
}

.custom-select.open {
    border-color: var(--primary-color);
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
}

.custom-select-trigger {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    color: #e0e0e0;
    cursor: pointer;
    min-height: 32px;
}

.custom-select-trigger:after {
    content: '';
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid rgba(255, 255, 255, 0.5);
    transition: transform 0.3s ease, border-top-color 0.3s ease;
}

.custom-select.open .custom-select-trigger:after {
    transform: rotate(180deg);
    border-top-color: var(--primary-color);
}

.custom-options {
    position: fixed;
    display: block;
    background: #121214;
    border-radius: 12px;
    border: 1px solid rgba(255, 204, 0, 0.25);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    z-index: 2147483647;
    max-height: 250px;
    overflow-y: auto;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.7);
}

.custom-options::-webkit-scrollbar {
    width: 4px;
}

.custom-options::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
}

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

.custom-option {
    position: relative;
    display: block;
    padding: 10px 15px;
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
    text-align: start;
    white-space: normal;
    word-break: break-word;
    line-height: 1.4;
}

.custom-option:hover {
    background: rgba(255, 204, 0, 0.08);
    color: var(--primary-color);
}

.custom-option.selection {
    background: rgba(255, 204, 0, 0.15);
    color: var(--primary-color);
    font-weight: 700;
}

.input-wrapper .custom-select-wrapper + i {
    display: none;
}

.custom-option img,
.custom-select-trigger img {
    width: 20px;
    height: 15px;
    vertical-align: middle;
    margin-inline-end: 8px;
    border-radius: 2px;
    object-fit: cover;
}
