/* ── Searchable principal amount select (loan calculators) ───────────────── */

.lps-wrapper {
    position: relative;
    width: 100%;
    flex: 1;
    min-width: 0;
}

/* Trigger button */
.lps-display {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    min-height: 48px;
    padding: 12px 14px;
    box-sizing: border-box;
    background: #fff;
    border: 1px solid #cbd8d0;
    border-radius: 10px;
    cursor: pointer;
    user-select: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.lps-display:hover,
.lps-display.lps-active {
    border-color: var(--teal-green);
    box-shadow: 0 0 0 3px rgba(72, 155, 116, 0.15);
    outline: none;
}

.lps-display:focus {
    outline: 2px solid var(--teal-green);
    outline-offset: 2px;
}

.lps-display-text {
    flex: 1;
    font-size: 15px;
    font-weight: 600;
    color: #284c3a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lps-display-text.lps-placeholder {
    color: #999;
    font-weight: 400;
}

.lps-arrow {
    flex-shrink: 0;
    font-size: 18px;
    color: #888;
    line-height: 1;
    transition: transform 0.2s;
}

.lps-display.lps-active .lps-arrow {
    transform: rotate(180deg);
}

/* Dropdown panel */
.lps-panel {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    width: 100%;
    z-index: 9100;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    overflow: hidden;
}

/* Search row */
.lps-search-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-bottom: 1px solid #e5e7eb;
    background: #f9fafb;
}

.lps-search-icon {
    flex-shrink: 0;
    color: #9ca3af;
    font-size: 15px;
}

.lps-search {
    flex: 1;
    width: 100%;
    margin: 0;
    padding: 2px 0;
    border: none;
    background: transparent;
    font-size: 14px;
    color: #284c3a;
    outline: none;
}

.lps-search::placeholder {
    color: #b0b0b0;
}

/* Options list */
.lps-list {
    list-style: none;
    margin: 0;
    padding: 4px 0;
    max-height: 240px;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.lps-list::-webkit-scrollbar {
    width: 5px;
}

.lps-list::-webkit-scrollbar-thumb {
    background: #cbd8d0;
    border-radius: 4px;
}

.lps-option {
    padding: 10px 14px;
    font-size: 14px;
    color: #284c3a;
    cursor: pointer;
}

.lps-option:hover,
.lps-option.lps-focused {
    background: #eef6f1;
}

.lps-option.lps-selected {
    background: #e2f0e9;
    font-weight: 600;
}

.lps-option mark {
    background: #fff3b0;
    color: inherit;
}

.lps-empty {
    padding: 12px 14px;
    font-size: 14px;
    color: #999;
    text-align: center;
}

/* Layout inside .loan-fields (mirrors the other selects) */
@media (min-width: 768px) {
    .loan-fields .lps-wrapper {
        width: 250px;
        flex: 0 0 250px;
    }

    .calc-step .loan-fields .lps-wrapper {
        width: 200px;
        flex: 0 0 200px;
    }
}

@media (max-width: 767px) {
    .loan-fields .lps-wrapper {
        flex: 1 1 100%;
        width: 100%;
    }
}
