/* Custom tweaks added during the Laravel migration. Loaded after styles.css. */

/* --- Converter amount row + currency selector --------------------------- */
/* The amount input grows; the green button next to it is a fixed-width trigger
   that opens a searchable list of ALL currencies. The six quick radio buttons
   below keep working unchanged. Built as a flex row so it no longer depends on
   the legacy label.sum 75%/25% float trick (which bled into the dropdown). */
.converter .sum {
    display: block;
    width: 100%;
}
.converter .sum-row {
    display: flex;
    align-items: stretch;
    margin: 3px 0;
}
.converter .sum-input {
    flex: 1 1 auto;
    min-width: 0;
    box-sizing: border-box;
    height: 46px;
    line-height: 36px;
    padding: 4px 10px;
    font-size: 24px;
    color: #000;
    background: #f8fafc;
    border: 1px solid #cdd1d2;
    border-right: 0;
    border-radius: 0;
    -webkit-appearance: none;
    -moz-appearance: textfield;
    appearance: none;
}
.converter .sum-input:focus {
    outline: none;
    border-color: #169b81;
}
.converter .sum-input::-webkit-outer-spin-button,
.converter .sum-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.curr-select {
    position: relative;
    flex: 0 0 auto;
    min-width: 76px;
    cursor: pointer;
    -webkit-user-select: none;
    user-select: none;
}
.curr-select .selectedCurr {
    display: flex;
    align-items: center;
    justify-content: center;
    float: none;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 2px 24px 0 12px;
    background: #169b81;
    color: #fff;
    font-size: 18px;
    font-weight: 500;
    text-align: center;
    white-space: nowrap;
    box-sizing: border-box;
}
.curr-select .curr-select-caret {
    position: absolute;
    top: 0;
    right: 9px;
    height: 100%;
    display: flex;
    align-items: center;
    color: #fff;
    font-size: 14px;
    pointer-events: none;
    transition: transform .15s ease;
}
.curr-select.open .curr-select-caret {
    transform: rotate(180deg);
}

.curr-select .curr-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    z-index: 1050;
    width: 300px;
    max-width: 92vw;
    background: #fff;
    border: 1px solid #e2e7e8;
    border-radius: 6px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .16);
    overflow: hidden;
    text-align: left;
    cursor: auto;
}
.curr-select.open .curr-dropdown {
    display: block;
}
.curr-select .curr-dropdown-search {
    display: block;
    width: 100%;
    height: auto;
    margin: 0;
    padding: 10px 14px;
    border: 0;
    border-bottom: 1px solid #eef1f2;
    border-radius: 0;
    background: #fff;
    color: #333;
    font-size: 14px;
    line-height: 20px;
    float: none;
    box-sizing: border-box;
    -webkit-appearance: none;
}
.curr-select .curr-dropdown-search:focus {
    outline: none;
}
.curr-select .curr-dropdown-list {
    list-style: none;
    margin: 0;
    padding: 6px 0;
    max-height: 280px;
    overflow-y: auto;
}
.curr-select .curr-dropdown-list li {
    display: flex;
    align-items: center;
    padding: 9px 14px;
    font-size: 14px;
    line-height: 1.2;
    color: #3c4043;
    cursor: pointer;
    white-space: nowrap;
}
.curr-select .curr-dropdown-list li b {
    flex: 0 0 40px;
    color: #169b81;
    font-weight: 600;
}
.curr-select .curr-dropdown-list li .cn {
    flex: 1 1 auto;
    overflow: hidden;
    text-overflow: ellipsis;
}
.curr-select .curr-dropdown-list li:hover {
    background: #f3f7f6;
}
.curr-select .curr-dropdown-list li.active {
    color: #0f8f76;
    font-weight: 500;
}
.curr-select .curr-dropdown-list li.active::after {
    content: "\2713";
    flex: 0 0 18px;
    margin-left: auto;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #1aa78a;
    color: #fff;
    font-size: 11px;
    line-height: 18px;
    text-align: center;
}
.curr-select .curr-dropdown-list li.unavailable {
    color: #c0c6c8;
    cursor: not-allowed;
}
.curr-select .curr-dropdown-list li.unavailable b {
    color: #d4dadc;
}


/* Sticky top navigation on desktop (>=992px), where the menu is horizontal.
   On mobile the menu is a collapsible toggle, so it stays in normal flow. */
@media (min-width: 992px) {
    #main-menu {
        position: -webkit-sticky;
        position: sticky;
        top: 0;
        z-index: 1030;
        box-shadow: 0 2px 6px rgba(0, 0, 0, .15);
    }
}
