.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;
}

/* ============ BASE ============ */
.custom-select {
    position: relative;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(255, 204, 0, 0.2);
    border-radius: 10px;
    background: #121214;
    transition: border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.custom-select:hover {
    border-color: rgba(255, 204, 0, 0.45);
    background: #19191d;
}

.custom-select.open {
    border-color: var(--primary-color);
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.45), inset 0 0 0 1px rgba(255, 204, 0, 0.1);
}

/* ============ TRIGGER ============ */
.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;
    gap: 8px;
}

.custom-select-trigger .trigger-label {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.custom-select-trigger .trigger-tags {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    overflow: hidden;
    align-items: center;
}

.custom-select-trigger .multi-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(255, 204, 0, 0.12);
    color: #ffcc00;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    line-height: 1.4;
    white-space: nowrap;
    border: 1px solid rgba(255, 204, 0, 0.15);
}

.custom-select-trigger .multi-tag-count {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(255, 204, 0, 0.12);
    color: #ffcc00;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    line-height: 1.4;
    border: 1px solid rgba(255, 204, 0, 0.15);
}

.custom-select-trigger .multi-tag .tag-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    font-size: 10px;
    cursor: pointer;
    transition: all 0.15s ease;
    margin-inline-start: 2px;
}

.custom-select-trigger .multi-tag .tag-remove:hover {
    background: rgba(255, 71, 87, 0.3);
    color: #ff4757;
}

.custom-select-trigger .trigger-placeholder {
    color: rgba(255, 255, 255, 0.35);
    font-weight: 400;
    font-size: 12px;
}

.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.4);
    transition: transform 0.3s ease, border-top-color 0.3s ease;
    flex-shrink: 0;
}

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

/* ============ DROPDOWN ============ */
.custom-options {
    position: fixed;
    display: block;
    background: #18181b;
    border-radius: 12px;
    border: 1px solid rgba(255, 204, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
    z-index: 2147483647;
    max-height: 280px;
    overflow-y: auto;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6);
    transform: translateY(4px) scale(0.98);
}

.custom-options.open-options {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
    transform: translateY(0) scale(1);
}

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

.custom-options::-webkit-scrollbar-thumb {
    background: rgba(255, 204, 0, 0.3);
    border-radius: 10px;
}

.custom-options::-webkit-scrollbar-track {
    background: transparent;
}

/* ============ OPTION ITEMS ============ */
.custom-option {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease, padding-inline-start 0.15s ease;
    text-align: start;
    white-space: normal;
    word-break: break-word;
    line-height: 1.4;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.custom-option:last-child {
    border-bottom: none;
}

.custom-option:hover {
    background: rgba(255, 204, 0, 0.07);
    color: #ffcc00;
    padding-inline-start: 18px;
}

.custom-option .option-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 4px;
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    background: transparent;
    transition: all 0.2s ease;
    flex-shrink: 0;
    font-size: 10px;
    color: transparent;
}

.custom-option.selection .option-check {
    background: #ffcc00;
    border-color: #ffcc00;
    color: #121214;
}

.custom-option.selection {
    background: rgba(255, 204, 0, 0.1);
    color: #ffcc00;
    font-weight: 600;
}

.custom-option.selection:hover {
    background: rgba(255, 204, 0, 0.15);
    padding-inline-start: 18px;
}

.custom-option .option-label {
    flex: 1;
}

/* ============ MULTI-SELECT SEARCH ============ */
.custom-select-search-box {
    padding: 8px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    background: #18181b;
    position: sticky;
    top: 0;
    z-index: 10;
}

.custom-select-search-input {
    width: 100%;
    padding: 7px 10px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    color: #fff;
    font-size: 0.8rem;
    outline: none;
    font-family: inherit;
    transition: border-color 0.2s ease;
}

.custom-select-search-input:focus {
    border-color: rgba(255, 204, 0, 0.4);
    background: rgba(255, 255, 255, 0.08);
}

/* ============ FORM INTEGRATION ============ */
.lic-form-group .custom-select-trigger {
    padding: 10px 12px;
    min-height: 42px;
    font-size: 0.9rem;
}

.lic-form-group .custom-select-trigger .multi-tag {
    font-size: 11px;
    padding: 3px 8px;
}

.lic-form-group .custom-select-trigger .multi-tag-count {
    font-size: 11px;
    padding: 3px 8px;
}

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

/* ============ EMPTY STATE ============ */
.custom-options .custom-option-empty {
    padding: 20px;
    text-align: center;
    color: rgba(255, 255, 255, 0.3);
    font-size: 12px;
}

/* ============ LIGHT THEME ============ */
:root.light .custom-select {
    background: #ffffff;
    border-color: #d0d0d0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

:root.light .custom-select:hover {
    background: #fafafa;
    border-color: #aaa;
}

:root.light .custom-select.open {
    border-color: #ffcc00;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

:root.light .custom-select-trigger {
    color: #333;
}

:root.light .custom-select-trigger:after {
    border-top-color: rgba(0, 0, 0, 0.4);
}

:root.light .custom-select-trigger .trigger-placeholder {
    color: rgba(0, 0, 0, 0.3);
}

:root.light .custom-select-trigger .multi-tag {
    background: rgba(255, 204, 0, 0.15);
    color: #996600;
    border-color: rgba(255, 204, 0, 0.25);
}

:root.light .custom-select-trigger .multi-tag .tag-remove {
    background: rgba(0, 0, 0, 0.08);
    color: rgba(0, 0, 0, 0.4);
}

:root.light .custom-select-trigger .multi-tag .tag-remove:hover {
    background: rgba(255, 71, 87, 0.2);
    color: #ff4757;
}

:root.light .custom-select-trigger .multi-tag-count {
    background: rgba(255, 204, 0, 0.15);
    color: #996600;
    border-color: rgba(255, 204, 0, 0.25);
}

:root.light .custom-options {
    background: #ffffff;
    border-color: #d0d0d0;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
}

:root.light .custom-option {
    color: #444;
    border-bottom-color: rgba(0, 0, 0, 0.05);
}

:root.light .custom-option:hover {
    background: rgba(255, 204, 0, 0.06);
    color: #996600;
}

:root.light .custom-option .option-check {
    border-color: rgba(0, 0, 0, 0.2);
}

:root.light .custom-option.selection .option-check {
    background: #ffcc00;
    border-color: #ffcc00;
    color: #fff;
}

:root.light .custom-option.selection {
    background: rgba(255, 204, 0, 0.1);
    color: #996600;
}

:root.light .custom-option.selection:hover {
    background: rgba(255, 204, 0, 0.15);
}

:root.light .custom-select-search-box {
    background: #ffffff;
    border-bottom-color: rgba(0, 0, 0, 0.06);
}

:root.light .custom-select-search-input {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.08);
    color: #333;
}

:root.light .custom-select-search-input:focus {
    border-color: rgba(255, 204, 0, 0.5);
    background: rgba(0, 0, 0, 0.02);
}

:root.light .custom-options .custom-option-empty {
    color: rgba(0, 0, 0, 0.3);
}

/* ============ CUSTOM MULTIPLE ============ */
.custom-multiple-wrapper {
    position: relative;
    width: 100%;
    user-select: none;
}

.custom-multiple {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px 36px 8px 12px;
    min-height: 44px;
    border: 1px solid rgba(255, 204, 0, 0.2);
    border-radius: 10px;
    background: #121214;
    cursor: pointer;
    transition: border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.custom-multiple:hover {
    border-color: rgba(255, 204, 0, 0.45);
    background: #19191d;
}

.custom-multiple.is-open {
    border-color: var(--primary-color);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.45), inset 0 0 0 1px rgba(255, 204, 0, 0.1);
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
}

.custom-multiple::after {
    content: '';
    position: absolute;
    inset-inline-end: 12px;
    top: 50%;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid rgba(255, 255, 255, 0.4);
    transition: transform 0.3s ease;
    transform: translateY(-50%);
}

.custom-multiple.is-open::after {
    transform: translateY(-50%) rotate(180deg);
    border-top-color: var(--primary-color);
}

.custom-multiple-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: linear-gradient(135deg, rgba(255, 204, 0, 0.12), rgba(255, 204, 0, 0.06));
    color: #ffcc00;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 6px;
    line-height: 1.3;
    border: 1px solid rgba(255, 204, 0, 0.15);
    animation: chipPop 0.2s ease;
}

@keyframes chipPop {
    0% { transform: scale(0.85); opacity: 0; }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); opacity: 1; }
}

.custom-multiple-chip .chip-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.15s ease;
    line-height: 1;
}

.custom-multiple-chip .chip-remove:hover {
    background: rgba(255, 71, 87, 0.3);
    color: #ff4757;
}

.custom-multiple-placeholder {
    color: rgba(255, 255, 255, 0.3);
    font-size: 13px;
    font-weight: 400;
}

.custom-multiple-count {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: linear-gradient(135deg, rgba(255, 204, 0, 0.12), rgba(255, 204, 0, 0.06));
    color: #ffcc00;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid rgba(255, 204, 0, 0.15);
}

/* Dropdown */
.custom-multiple-dropdown {
    position: fixed;
    background: #18181b;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
    z-index: 2147483647;
    max-height: 320px;
    overflow-y: auto;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6);
    transform: translateY(4px) scale(0.97);
    min-width: 220px;
    padding: 8px;
}

.custom-multiple-dropdown.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
    transform: translateY(0) scale(1);
}

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

.custom-multiple-dropdown::-webkit-scrollbar-thumb {
    background: rgba(255, 204, 0, 0.3);
    border-radius: 10px;
}

.custom-multiple-dropdown::-webkit-scrollbar-track {
    background: transparent;
}

/* Search */
.custom-multiple-search {
    padding: 10px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    background: #18181b;
    position: sticky;
    top: 0;
    z-index: 10;
}

.custom-multiple-search input {
    width: 100%;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    color: #fff;
    font-size: 13px;
    outline: none;
    font-family: inherit;
    transition: border-color 0.2s ease, background 0.2s ease;
    box-sizing: border-box;
}

.custom-multiple-search input:focus {
    border-color: rgba(255, 204, 0, 0.4);
    background: rgba(255, 255, 255, 0.08);
}

.custom-multiple-search input::placeholder {
    color: rgba(255, 255, 255, 0.25);
}

/* Options - visa-select-card style */
.custom-multiple-dropdown {
    padding: 8px;
}

.custom-multiple-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
    cursor: pointer;
    transition: all 0.2s ease;
    background: rgba(18, 18, 20, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
}

.custom-multiple-option:last-child {
    margin-bottom: 0;
}

.custom-multiple-option:hover {
    border-color: rgba(255, 204, 0, 0.3);
    background: rgba(255, 255, 255, 0.04);
}

.custom-multiple-option.is-selected {
    border-color: #ffcc00;
    background: rgba(255, 204, 0, 0.08);
    box-shadow: 0 0 12px rgba(255, 204, 0, 0.15);
    color: #ffcc00;
    font-weight: 600;
}

.custom-multiple-option.is-selected:hover {
    background: rgba(255, 204, 0, 0.12);
    border-color: #ffcc00;
}

.custom-multiple-option .cm-label {
    flex: 1;
}

/* Circular check indicator (like visa-select-card .check-indicator) */
.custom-multiple-option .cm-check {
    margin-inline-end: 10px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
    position: relative;
    font-size: 0;
    color: transparent;
}

.custom-multiple-option.is-selected .cm-check {
    border-color: #ffcc00;
    background: #ffcc00;
}

.custom-multiple-option.is-selected .cm-check::after {
    content: '✓';
    font-size: 11px;
    font-weight: 700;
    color: #121214;
}

/* No results */
.custom-multiple-empty {
    padding: 20px;
    text-align: center;
    color: rgba(255, 255, 255, 0.25);
    font-size: 13px;
}

/* Hidden select */
select.custom-multiple-hidden {
    display: none !important;
}

/* Light theme */
:root.light .custom-multiple {
    background: #ffffff;
    border-color: #d0d0d0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

:root.light .custom-multiple:hover {
    background: #fafafa;
    border-color: #aaa;
}

:root.light .custom-multiple.is-open {
    border-color: #ffcc00;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1), inset 0 0 0 1px rgba(255, 204, 0, 0.15);
}

:root.light .custom-multiple::after {
    border-top-color: rgba(0, 0, 0, 0.4);
}

:root.light .custom-multiple-chip {
    background: linear-gradient(135deg, rgba(255, 204, 0, 0.15), rgba(255, 204, 0, 0.08));
    color: #996600;
    border-color: rgba(255, 204, 0, 0.25);
}

:root.light .custom-multiple-chip .chip-remove {
    background: rgba(0, 0, 0, 0.06);
    color: rgba(0, 0, 0, 0.4);
}

:root.light .custom-multiple-chip .chip-remove:hover {
    background: rgba(255, 71, 87, 0.15);
    color: #ff4757;
}

:root.light .custom-multiple-count {
    background: linear-gradient(135deg, rgba(255, 204, 0, 0.15), rgba(255, 204, 0, 0.08));
    color: #996600;
    border-color: rgba(255, 204, 0, 0.25);
}

:root.light .custom-multiple-placeholder {
    color: rgba(0, 0, 0, 0.25);
}

:root.light .custom-multiple-dropdown {
    background: #f5f5f5;
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.1);
}

:root.light .custom-multiple-option {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(0, 0, 0, 0.08);
    color: #444;
}

:root.light .custom-multiple-option:hover {
    border-color: rgba(255, 204, 0, 0.3);
    background: rgba(255, 255, 255, 0.98);
}

:root.light .custom-multiple-option.is-selected {
    border-color: #ffcc00;
    background: rgba(255, 204, 0, 0.08);
    box-shadow: 0 0 12px rgba(255, 204, 0, 0.12);
    color: #996600;
}

:root.light .custom-multiple-option.is-selected:hover {
    background: rgba(255, 204, 0, 0.12);
}

:root.light .custom-multiple-option .cm-check {
    border-color: rgba(0, 0, 0, 0.2);
}

:root.light .custom-multiple-option.is-selected .cm-check {
    background: #ffcc00;
    border-color: #ffcc00;
}

:root.light .custom-multiple-option.is-selected .cm-check::after {
    color: #ffffff;
}

:root.light .custom-multiple-search input {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.08);
    color: #333;
}

:root.light .custom-multiple-search input:focus {
    border-color: rgba(255, 204, 0, 0.5);
    background: rgba(0, 0, 0, 0.02);
}

:root.light .custom-multiple-empty {
    color: rgba(0, 0, 0, 0.25);
}