/* ============================================
   YK-SELECT — Modern Custom Dropdown
   Turuncu tema ile uyumlu, arama destekli
   ============================================ */

.yk-select {
    position: relative;
    width: 100%;
    font-family: inherit;
}

.yk-select-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    padding: 12px 16px;
    min-height: 48px;
    background: #fff;
    border: 1.5px solid #E2E8F0;
    border-radius: 14px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    color: #1e293b;
    transition: all .2s cubic-bezier(.4, 0, .2, 1);
    user-select: none;
    text-align: left;
    outline: none;
}

.yk-select-trigger:hover {
    border-color: #CBD5E1;
    background: #FAFBFC;
}

.yk-select.is-open .yk-select-trigger,
.yk-select-trigger:focus-visible {
    border-color: #FF6B00;
    box-shadow: 0 0 0 4px rgba(255, 107, 0, .12);
    background: #fff;
}

.yk-select.is-filled .yk-select-trigger {
    color: #0F172A;
}

.yk-select-trigger[data-placeholder="true"] {
    color: #94A3B8;
    font-weight: 500;
}

.yk-select-value {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.yk-select-caret {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #64748B;
    transition: transform .25s cubic-bezier(.4, 0, .2, 1);
    background: #F1F5F9;
    border-radius: 8px;
}

.yk-select.is-open .yk-select-caret {
    transform: rotate(180deg);
    color: #FF6B00;
    background: rgba(255, 107, 0, .1);
}

/* Large variant (form-select-lg için) */
.yk-select.yk-lg .yk-select-trigger {
    min-height: 58px;
    padding: 14px 18px;
    font-size: 16px;
    border-radius: 16px;
}

/* Dropdown Panel */
.yk-select-panel {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 16px;
    border: 1.5px solid #F1F5F9;
    box-shadow:
        0 20px 48px -12px rgba(15, 23, 42, .15),
        0 6px 18px rgba(15, 23, 42, .06);
    z-index: 1055;
    max-height: 340px;
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scale(.98);
    transform-origin: top center;
    transition: all .2s cubic-bezier(.4, 0, .2, 1);
    overflow: hidden;
}

.yk-select.is-open .yk-select-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* Açılım yönü yukarı */
.yk-select.is-open-up .yk-select-panel {
    top: auto;
    bottom: calc(100% + 6px);
    transform-origin: bottom center;
}

/* Search box */
.yk-select-search {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-bottom: 1px solid #F1F5F9;
    background: #FAFBFC;
    flex-shrink: 0;
}

.yk-select-search i {
    color: #94A3B8;
    font-size: 15px;
}

.yk-select-search input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: 14px;
    color: #0F172A;
    font-family: inherit;
}

.yk-select-search input::placeholder {
    color: #94A3B8;
}

/* Options list */
.yk-select-options {
    flex: 1;
    overflow-y: auto;
    padding: 6px;
}

.yk-select-options::-webkit-scrollbar {
    width: 6px;
}

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

.yk-select-options::-webkit-scrollbar-thumb {
    background: #CBD5E1;
    border-radius: 10px;
}

.yk-select-options::-webkit-scrollbar-thumb:hover {
    background: #FF6B00;
}

.yk-select-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #334155;
    transition: all .15s ease;
    user-select: none;
}

.yk-select-option-img {
    width: 28px;
    height: 28px;
    object-fit: contain;
    flex-shrink: 0;
}

.yk-select-option-ikon {
    font-size: 20px;
    color: #FF6B00;
    width: 28px;
    text-align: center;
    flex-shrink: 0;
}

.yk-select-option-text {
    flex: 1;
}

.yk-select-option:hover,
.yk-select-option.is-active {
    background: rgba(255, 107, 0, .08);
    color: #FF6B00;
}

.yk-select-option.is-selected {
    background: linear-gradient(135deg, rgba(255, 107, 0, .12), rgba(255, 140, 66, .08));
    color: #FF6B00;
    font-weight: 700;
}

.yk-select-option.is-selected::after {
    content: '\F26B';
    font-family: 'bootstrap-icons';
    font-size: 16px;
    font-weight: normal;
}

.yk-select-option.is-disabled {
    opacity: .4;
    cursor: not-allowed;
    pointer-events: none;
}

.yk-select-empty {
    padding: 28px 16px;
    text-align: center;
    color: #94A3B8;
    font-size: 13px;
}

.yk-select-empty i {
    font-size: 28px;
    display: block;
    margin-bottom: 8px;
    color: #CBD5E1;
}

/* Invalid state (form validation) */
.yk-select.is-invalid .yk-select-trigger {
    border-color: #EF4444;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, .1);
}

/* Disabled state */
.yk-select.is-disabled {
    opacity: .6;
    pointer-events: none;
}

.yk-select.is-disabled .yk-select-trigger {
    background: #F8FAFC;
    cursor: not-allowed;
}

/* Overlay (mobile) */
@media (max-width: 576px) {
    .yk-select-panel {
        position: fixed;
        left: 12px;
        right: 12px;
        top: auto;
        bottom: 12px;
        max-height: 60vh;
        border-radius: 20px;
    }

    .yk-select.is-open-up .yk-select-panel {
        top: auto;
        bottom: 12px;
    }
}

/* Native <select>'i gizle (JS ile upgrade edilen) */
select.yk-select-native {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
