
/* =========================================================
   BRIOCOM — FUTURISTIC SIDEBAR CURRENCY CONVERTER
   ========================================================= */

.sidebar-currency-converter {
    --currency-bg: #080808;
    --currency-panel: #0d0d0f;
    --currency-panel-2: #111114;
    --currency-border: rgba(255, 255, 255, 0.08);
    --currency-border-hover: rgba(255, 45, 45, 0.55);
    --currency-red: #ff3030;
    --currency-red-bright: #ff4b4b;
    --currency-red-soft: rgba(255, 48, 48, 0.12);
    --currency-red-glow: rgba(255, 48, 48, 0.28);
    --currency-text: #f5f5f5;
    --currency-muted: #8c8c94;
    --currency-dim: #55555d;
    --currency-green: #38e58c;

    position: relative;
    width: 100%;
    padding: 20px;

    background:
        radial-gradient(
            circle at 100% 0%,
            rgba(255, 40, 40, 0.10),
            transparent 34%
        ),
        radial-gradient(
            circle at 0% 100%,
            rgba(255, 40, 40, 0.045),
            transparent 30%
        ),
        linear-gradient(
            145deg,
            #090909 0%,
            #070707 100%
        );

    border: 1px solid var(--currency-border);
    border-radius: 18px;

    box-shadow:
        0 18px 45px rgba(0, 0, 0, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.035);

    overflow: visible;
    isolation: isolate;
}


/* =========================================================
   FUTURISTIC TOP ACCENT
   ========================================================= */

.sidebar-currency-converter::before {
    content: "";
    position: absolute;
    top: -1px;
    left: 18px;
    right: 18px;
    height: 1px;

    background: linear-gradient(
        90deg,
        transparent,
        var(--currency-red),
        transparent
    );

    opacity: 0.75;

    box-shadow:
        0 0 12px var(--currency-red-glow);
}


.sidebar-currency-converter::after {
    content: "";
    position: absolute;
    top: 18px;
    right: 18px;

    width: 5px;
    height: 5px;

    background: var(--currency-red);

    border-radius: 50%;

    box-shadow:
        0 0 8px var(--currency-red),
        0 0 18px var(--currency-red-glow);

    animation: currencyPulse 2.4s ease-in-out infinite;
}


/* =========================================================
   HEADER
   ========================================================= */

.currency-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;

    margin-bottom: 20px;
}


.currency-eyebrow {
    display: block;

    margin-bottom: 5px;

    color: var(--currency-red);

    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;

    opacity: 0.9;
}


.currency-header h3 {
    margin: 0;

    color: var(--currency-text);

    font-size: 10px;
    font-weight: 100;
    letter-spacing: -0.025em;
    line-height: 1.2;
}


.currency-icon {
    display: grid;
    place-items: center;

    flex: 0 0 38px;

    width: 38px;
    height: 38px;

    color: var(--currency-red);

    background:
        linear-gradient(
            145deg,
            rgba(255, 48, 48, 0.14),
            rgba(255, 48, 48, 0.035)
        );

    border: 1px solid rgba(255, 48, 48, 0.28);
    border-radius: 11px;

    font-size: 17px;
    font-weight: 800;

    box-shadow:
        inset 0 0 15px rgba(255, 48, 48, 0.04),
        0 0 18px rgba(255, 48, 48, 0.04);
}


/* =========================================================
   ALL FIELD LABELS
   ========================================================= */

.sidebar-currency-converter .currency-field > label {
    display: block;

    margin-bottom: 3px;

    color: #9999a2;

    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}


/* =========================================================
   AMOUNT FIELD
   ========================================================= */

.currency-input-wrap {
    position: relative;

    display: flex;
    align-items: center;

    min-height: 50px;

    background:
        linear-gradient(
            135deg,
            rgba(255, 255, 255, 0.035),
            rgba(255, 255, 255, 0.012)
        );

    border: 1px solid var(--currency-border);
    border-radius: 11px;

    transition:
        border-color 0.22s ease,
        box-shadow 0.22s ease,
        background 0.22s ease;
}


.currency-input-wrap:hover {
    border-color: rgba(255, 255, 255, 0.14);
}


.currency-input-wrap:focus-within {
    background:
        linear-gradient(
            135deg,
            rgba(255, 48, 48, 0.055),
            rgba(255, 255, 255, 0.015)
        );

    border-color: rgba(255, 48, 48, 0.48);

    box-shadow:
        0 0 0 3px rgba(255, 48, 48, 0.07),
        0 0 22px rgba(255, 48, 48, 0.08);
}


.currency-symbol {
    display: grid;
    place-items: center;

    width: 42px;

    color: var(--currency-red);

    font-size: 15px;
    font-weight: 800;

    user-select: none;
}


.currency-input-wrap input {
    width: 100%;
    height: 48px;

    padding: 0 12px 0 0;

    color: var(--currency-text);
    background: transparent;

    border: 0;
    outline: 0;

    font: inherit;
    font-size: 15px;
    font-weight: 650;
}


.currency-input-wrap input::placeholder {
    color: #4e4e55;
}


.currency-input-wrap input::-webkit-inner-spin-button,
.currency-input-wrap input::-webkit-outer-spin-button {
    opacity: 0.45;
}


/* =========================================================
   FROM / TO ROW
   ========================================================= */

.currency-conversion-row {
    position: relative;

    display: grid;

    grid-template-columns: minmax(0, 1fr) 34px minmax(0, 1fr);

    align-items: end;

    gap: 8px;

    margin-top: 15px;
}


/* =========================================================
   SEARCH BOX
   ========================================================= */

.currency-search-box {
    position: relative;

    width: 100%;
}


/* =========================================================
   SEARCH TRIGGER
   ========================================================= */

.currency-search-trigger {
    position: relative;

    display: flex;
    align-items: center;

    width: 100%;
    min-height: 54px;

    padding: 9px 34px 9px 12px;

    color: var(--currency-text);

    background:
        linear-gradient(
            145deg,
            rgba(255, 255, 255, 0.038),
            rgba(255, 255, 255, 0.012)
        );

    border: 1px solid var(--currency-border);
    border-radius: 11px;

    text-align: left;

    cursor: pointer;

    transition:
        border-color 0.22s ease,
        background 0.22s ease,
        box-shadow 0.22s ease,
        transform 0.18s ease;
}


.currency-search-trigger:hover {
    background:
        linear-gradient(
            145deg,
            rgba(255, 48, 48, 0.065),
            rgba(255, 255, 255, 0.018)
        );

    border-color: rgba(255, 48, 48, 0.36);
}


.currency-search-trigger:focus-visible,
.currency-search-trigger[aria-expanded="true"] {
    outline: none;

    border-color: rgba(255, 48, 48, 0.62);

    box-shadow:
        0 0 0 3px rgba(255, 48, 48, 0.07),
        0 0 22px rgba(255, 48, 48, 0.08);
}


.currency-search-trigger[aria-expanded="true"] {
    background:
        linear-gradient(
            145deg,
            rgba(255, 48, 48, 0.08),
            rgba(255, 255, 255, 0.018)
        );
}


/* =========================================================
   CURRENCY CODE
   ========================================================= */

.currency-search-code {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 39px;
    height: 26px;

    padding: 0 6px;

    color: #ffffff;

    background: rgba(255, 48, 48, 0.10);

    border: 1px solid rgba(255, 48, 48, 0.22);
    border-radius: 6px;

    font-size: 10px;
    font-weight: 850;
    letter-spacing: 0.06em;

    flex-shrink: 0;
}


/* =========================================================
   CURRENCY NAME
   ========================================================= */

.currency-search-name {
    min-width: 0;

    margin-left: 8px;

    overflow: hidden;

    color: #a8a8b0;

    font-size: 10px;
    font-weight: 550;

    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
}


/* =========================================================
   SEARCH ARROW
   ========================================================= */

.currency-search-arrow {
    position: absolute;

    top: 50%;
    right: 11px;

    color: #777780;

    font-size: 15px;
    line-height: 1;

    transform: translateY(-50%);

    transition:
        color 0.2s ease,
        transform 0.2s ease;
}


.currency-search-trigger:hover .currency-search-arrow,
.currency-search-trigger[aria-expanded="true"] .currency-search-arrow {
    color: var(--currency-red);
}


.currency-search-trigger[aria-expanded="true"] .currency-search-arrow {
    transform: translateY(-50%) rotate(180deg);
}


/* =========================================================
   SWAP BUTTON
   ========================================================= */

.currency-swap {
    display: grid;
    place-items: center;

    width: 34px;
    height: 34px;

    margin-bottom: 10px;

    color: var(--currency-red);

    background:
        radial-gradient(
            circle,
            rgba(255, 48, 48, 0.13),
            rgba(255, 48, 48, 0.025)
        );

    border: 1px solid rgba(255, 48, 48, 0.28);
    border-radius: 50%;

    font-size: 17px;
    font-weight: 800;

    cursor: pointer;

    transition:
        transform 0.25s ease,
        background 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}


.currency-swap:hover {
    background: rgba(255, 48, 48, 0.14);

    border-color: rgba(255, 48, 48, 0.65);

    box-shadow:
        0 0 14px rgba(255, 48, 48, 0.18);

    transform: rotate(180deg);
}


.currency-swap:active {
    transform: rotate(180deg) scale(0.9);
}
/* =========================================================
   BRIOCOM — SMART CURRENCY SEARCH PANEL
   Visible • Adaptive • No Clipping • Readable
   ========================================================= */

.currency-search-box {
    position: relative;
    width: 100%;
    min-width: 0;
}


/* =========================================================
   SEARCH PANEL
   ========================================================= */

.currency-search-panel {
    position: absolute;

    z-index: 10000;

    /*
       Open directly below the currency selector.
       The panel is allowed to become wider than the
       small currency field when necessary.
    */
    top: calc(50% + 8px);
    left: 0;

    width: min(100px, calc(100vw - 32px));
    min-width: 200px;

    padding: 10px;

    background:
        radial-gradient(
            circle at 100% 0%,
            rgba(255, 48, 48, 0.10),
            transparent 38%
        ),
        linear-gradient(
            145deg,
            #151518 0%,
            #0b0b0d 100%
        );

    border: 1px solid rgba(255, 48, 48, 0.32);
    border-radius: 14px;

    box-shadow:
        0 24px 55px rgba(0, 0, 0, 0.82),
        0 0 30px rgba(255, 48, 48, 0.10),
        inset 0 1px 0 rgba(255, 255, 255, 0.045);

    overflow: visible;

    animation: currencyPanelSmartIn 0.18s ease-out;
}


/*
   Important:
   The panel must remain visible even when the sidebar
   itself is narrow.
*/

.currency-search-panel[hidden] {
    display: none;
}


/* =========================================================
   SMALL RED TOP LINE
   ========================================================= */

.currency-search-panel::before {
    content: "";

    position: absolute;

    top: -1px;
    left: 18px;
    right: 18px;

    height: 1px;

    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(255, 48, 48, 0.9),
            transparent
        );

    box-shadow:
        0 0 10px rgba(255, 48, 48, 0.35);
}


/* =========================================================
   SEARCH INPUT WRAPPER
   ========================================================= */

.currency-search-input-wrap {
    position: relative;

    display: flex;
    align-items: center;

    width: 100%;
    height: 44px;

    background:
        linear-gradient(
            145deg,
            #08080a,
            #0d0d10
        );

    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 9px;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}


.currency-search-input-wrap:hover {
    border-color: rgba(255, 255, 255, 0.16);
}


.currency-search-input-wrap:focus-within {
    background:
        linear-gradient(
            145deg,
            rgba(255, 48, 48, 0.06),
            #0b0b0d
        );

    border-color: rgba(255, 48, 48, 0.58);

    box-shadow:
        0 0 0 3px rgba(255, 48, 48, 0.07),
        0 0 20px rgba(255, 48, 48, 0.08);
}


/* =========================================================
   SEARCH ICON
   ========================================================= */

.currency-search-icon {
    display: grid;
    place-items: center;

    flex: 0 0 38px;

    width: 38px;

    color: var(--currency-red);

    font-size: 18px;
    line-height: 1;

    pointer-events: none;
}


/* =========================================================
   SEARCH INPUT
   ========================================================= */

.currency-search-input {
    display: block;

    width: 100%;
    min-width: 0;
    height: 100%;

    padding: 0 38px 0 0;

    color: #ffffff;

    background: transparent;

    border: 0;
    outline: 0;

    font-family: inherit;
    font-size: 13px;
    font-weight: 550;

    line-height: 1;

    box-sizing: border-box;
}


.currency-search-input::placeholder {
    color: #686870;
    opacity: 1;
}


.currency-search-input::-webkit-search-cancel-button {
    display: none;
}


/* =========================================================
   CLEAR BUTTON
   ========================================================= */

.currency-search-clear {
    position: absolute;

    top: 50%;
    right: 7px;

    display: grid;
    place-items: center;

    width: 28px;
    height: 28px;

    padding: 0;

    color: #777780;

    background: transparent;

    border: 0;
    border-radius: 6px;

    font-size: 19px;
    font-weight: 400;
    line-height: 1;

    cursor: pointer;

    transform: translateY(-50%);

    transition:
        color 0.18s ease,
        background 0.18s ease,
        transform 0.18s ease;
}


.currency-search-clear:hover {
    color: #ffffff;

    background: rgba(255, 48, 48, 0.13);

    transform: translateY(-50%) scale(1.05);
}


/* =========================================================
   SEARCH RESULTS CONTAINER
   ========================================================= */

.currency-search-results {
    display: flex;
    flex-direction: column;

    width: 100%;

    max-height: 300px;

    margin-top: 9px;

    padding: 2px;

    overflow-x: hidden;
    overflow-y: auto;

    box-sizing: border-box;

    scrollbar-width: thin;
    scrollbar-color:
        rgba(255, 48, 48, 0.45)
        transparent;
}


.currency-search-results::-webkit-scrollbar {
    width: 5px;
}


.currency-search-results::-webkit-scrollbar-track {
    background: transparent;
}


.currency-search-results::-webkit-scrollbar-thumb {
    background:
        linear-gradient(
            180deg,
            rgba(255, 48, 48, 0.65),
            rgba(255, 48, 48, 0.20)
        );

    border-radius: 10px;
}


/* =========================================================
   SEARCH RESULT
   ========================================================= */

.currency-search-result {
    display: grid;

    grid-template-columns: 34px minmax(0, 1fr);

    align-items: center;

    width: 100%;
    min-height: 51px;

    padding: 7px 9px;

    color: #ffffff;

    background: transparent;

    border: 1px solid transparent;
    border-radius: 9px;

    text-align: left;

    cursor: pointer;

    box-sizing: border-box;

    transition:
        background 0.16s ease,
        border-color 0.16s ease,
        transform 0.16s ease;
}


.currency-search-result:hover,
.currency-search-result[aria-selected="true"],
.currency-search-result.active {
    background:
        linear-gradient(
            90deg,
            rgba(255, 48, 48, 0.14),
            rgba(255, 48, 48, 0.035)
        );

    border-color: rgba(255, 48, 48, 0.24);

    transform: translateX(2px);
}


.currency-search-result:focus-visible {
    outline: none;

    background: rgba(255, 48, 48, 0.10);

    border-color: rgba(255, 48, 48, 0.45);
}


/* =========================================================
   RESULT SYMBOL
   ========================================================= */

.currency-search-result-symbol {
    display: grid;
    place-items: center;

    width: 30px;
    height: 30px;

    color: var(--currency-red);

    background:
        rgba(255, 48, 48, 0.08);

    border: 1px solid rgba(255, 48, 48, 0.18);
    border-radius: 7px;

    font-size: 12px;
    font-weight: 800;

    flex-shrink: 0;
}


/* =========================================================
   RESULT INFORMATION
   ========================================================= */

.currency-search-result-info {
    min-width: 0;

    display: flex;
    flex-direction: column;

    justify-content: center;

    gap: 3px;

    padding-left: 9px;
}


/* =========================================================
   RESULT CODE
   ========================================================= */

.currency-search-result-code {
    display: block;

    color: #ffffff;

    font-size: 12px;
    font-weight: 850;
    letter-spacing: 0.05em;

    line-height: 1.2;
}


/* =========================================================
   RESULT FULL NAME

   IMPORTANT:
   Do NOT hide the name.
   It can wrap onto a second line.
   ========================================================= */

.currency-search-result-name {
    display: block;

    width: 100%;

    color: #9999a2;

    font-size: 11px;
    font-weight: 500;

    line-height: 1.35;

    /*
       Allow long names such as:

       "Central African CFA Franc"
       "United Arab Emirates Dirham"
       "Bosnia and Herzegovina Convertible Mark"

       to remain visible.
    */
    white-space: normal;

    overflow-wrap: anywhere;
    word-break: normal;
}


/* =========================================================
   SEARCH SECTION LABEL
   ========================================================= */

.currency-search-section-label {
    display: block;

    padding: 9px 9px 6px;

    color: #66666e;

    font-size: 9px;
    font-weight: 850;

    letter-spacing: 0.14em;
    line-height: 1.2;

    text-transform: uppercase;
}


/* =========================================================
   EMPTY SEARCH STATE
   ========================================================= */

.currency-search-empty {
    display: flex;
    align-items: center;
    justify-content: center;

    min-height: 70px;

    padding: 14px;

    color: #73737c;

    font-size: 11px;
    font-weight: 500;

    text-align: center;

    line-height: 1.5;
}


/* =========================================================
   SMART PANEL POSITIONING

   If the picker is on the RIGHT side of a layout,
   keep the panel from disappearing off-screen.
   ========================================================= */

.currency-search-box[data-currency-picker="to"]
.currency-search-panel {
    left: auto;
    right: 0;
}


/* =========================================================
   SMART PANEL POSITIONING FOR NARROW SIDEBARS
   ========================================================= */

@media (max-width: 500px) {

    .currency-search-panel {
        width: min(340px, calc(100vw - 28px));

        min-width: 250px;

        padding: 9px;
    }

    .currency-search-results {
        max-height: 280px;
    }

    .currency-search-result {
        min-height: 53px;
    }

    .currency-search-result-name {
        font-size: 10.5px;
    }
}


/* =========================================================
   VERY SMALL SCREENS

   Use a centered floating search panel so it NEVER
   gets clipped by the sidebar.
   ========================================================= */

@media (max-width: 360px) {

    .currency-search-panel,
    .currency-search-box[data-currency-picker="to"]
    .currency-search-panel {

        position: fixed;

        z-index: 99999;

        top: 50%;
        left: 50%;
        right: auto;

        width: calc(100vw - 24px);

        max-width: 340px;

        min-width: 0;

        max-height: min(520px, calc(100vh - 30px));

        transform: translate(-50%, -50%);

        overflow: hidden;
    }


    .currency-search-results {
        max-height: 350px;
    }
}


/* =========================================================
   PANEL ANIMATION
   ========================================================= */

@keyframes currencyPanelSmartIn {

    from {
        opacity: 0;

        transform:
            translateY(-6px)
            scale(0.985);
    }

    to {
        opacity: 1;

        transform:
            translateY(0)
            scale(1);
    }
}


/* =========================================================
   VERY SMALL SCREEN ANIMATION
   ========================================================= */

@media (max-width: 360px) {

    @keyframes currencyPanelSmartIn {

        from {
            opacity: 0;

            transform:
                translate(-50%, -48%)
                scale(0.97);
        }

        to {
            opacity: 1;

            transform:
                translate(-50%, -50%)
                scale(1);
        }
    }
}


/* =========================================================
   ACCESSIBILITY
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    .currency-search-panel,
    .currency-search-result,
    .currency-search-clear {
        animation: none !important;
        transition: none !important;
    }
}


/* =========================================================
   SEARCH RESULTS
   ========================================================= */

.currency-search-results {
    max-height: 245px;

    margin-top: 7px;

    overflow-y: auto;

    scrollbar-width: thin;
    scrollbar-color:
        rgba(255, 48, 48, 0.35)
        transparent;
}


.currency-search-results::-webkit-scrollbar {
    width: 4px;
}


.currency-search-results::-webkit-scrollbar-track {
    background: transparent;
}


.currency-search-results::-webkit-scrollbar-thumb {
    background: rgba(255, 48, 48, 0.35);
    border-radius: 10px;
}


/* =========================================================
   SEARCH RESULT ITEM
   ========================================================= */

.currency-search-result {
    display: flex;
    align-items: center;

    width: 100%;
    min-height: 43px;

    padding: 6px 8px;

    color: #ffffff;

    background: transparent;

    border: 1px solid transparent;
    border-radius: 8px;

    text-align: left;

    cursor: pointer;

    transition:
        background 0.16s ease,
        border-color 0.16s ease,
        transform 0.16s ease;
}


.currency-search-result:hover,
.currency-search-result[aria-selected="true"],
.currency-search-result.active {
    background:
        linear-gradient(
            90deg,
            rgba(255, 48, 48, 0.12),
            rgba(255, 48, 48, 0.035)
        );

    border-color: rgba(255, 48, 48, 0.18);

    transform: translateX(2px);
}


.currency-search-result:focus-visible {
    outline: none;

    background: rgba(255, 48, 48, 0.10);

    border-color: rgba(255, 48, 48, 0.4);
}


/* =========================================================
   OPTIONAL RESULT ELEMENTS
   Supports JS-generated search content
   ========================================================= */

.currency-search-result-symbol {
    display: grid;
    place-items: center;

    width: 27px;
    height: 27px;

    margin-right: 8px;

    color: var(--currency-red);

    background: rgba(255, 48, 48, 0.07);

    border: 1px solid rgba(255, 48, 48, 0.13);
    border-radius: 6px;

    font-size: 11px;
    font-weight: 800;

    flex-shrink: 0;
}


.currency-search-result-info {
    min-width: 0;

    display: flex;
    flex-direction: column;

    gap: 2px;
}


.currency-search-result-code {
    color: #ffffff;

    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.05em;
}


.currency-search-result-name {
    overflow: hidden;

    color: #77777f;

    font-size: 9px;
    font-weight: 500;

    text-overflow: ellipsis;
    white-space: nowrap;
}


/* =========================================================
   SEARCH SECTION LABEL
   ========================================================= */

.currency-search-section-label {
    padding: 7px 8px 5px;

    color: #55555d;

    font-size: 8px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}


/* =========================================================
   EMPTY SEARCH STATE
   ========================================================= */

.currency-search-empty {
    padding: 20px 10px;

    color: #62626a;

    font-size: 10px;

    text-align: center;
}


/* =========================================================
   RESULT CARD
   ========================================================= */

.currency-result {
    position: relative;

    display: flex;
    flex-direction: column;

    margin-top: 16px;
    padding: 16px;

    background:
        radial-gradient(
            circle at 100% 0%,
            rgba(255, 48, 48, 0.12),
            transparent 42%
        ),
        linear-gradient(
            145deg,
            rgba(255, 255, 255, 0.045),
            rgba(255, 255, 255, 0.012)
        );

    border: 1px solid rgba(255, 48, 48, 0.20);
    border-radius: 13px;

    overflow: hidden;

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.035),
        0 8px 25px rgba(0, 0, 0, 0.22);
}


.currency-result::before {
    content: "";

    position: absolute;

    left: 0;
    top: 0;
    bottom: 0;

    width: 2px;

    background: linear-gradient(
        180deg,
        transparent,
        var(--currency-red),
        transparent
    );

    box-shadow:
        0 0 14px rgba(255, 48, 48, 0.4);
}


.currency-result-label {
    color: #777780;

    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}


.currency-result strong {
    display: block;

    margin-top: 5px;

    color: #ffffff;

    font-size: clamp(22px, 4vw, 29px);
    font-weight: 800;
    letter-spacing: -0.035em;
    line-height: 1.15;

    word-break: break-word;
}


.currency-rate {
    margin-top: 6px;

    color: #909098;

    font-size: 9px;
    line-height: 1.4;
}


.currency-inverse-rate {
    margin-top: 3px;

    color: #606069;

    font-size: 9px;
}


/* =========================================================
   COPY BUTTON
   ========================================================= */

.currency-copy {
    position: absolute;

    right: 11px;
    bottom: 11px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 5px;

    min-height: 29px;

    padding: 0 9px;

    color: #9999a1;

    background: rgba(255, 255, 255, 0.035);

    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 7px;

    font-size: 9px;
    font-weight: 700;

    cursor: pointer;

    transition:
        color 0.18s ease,
        background 0.18s ease,
        border-color 0.18s ease,
        transform 0.18s ease;
}


.currency-copy:hover {
    color: #ffffff;

    background: rgba(255, 48, 48, 0.10);

    border-color: rgba(255, 48, 48, 0.30);

    transform: translateY(-1px);
}


.currency-copy:active {
    transform: translateY(0) scale(0.96);
}


.currency-copy span:first-child {
    color: var(--currency-red);

    font-size: 12px;
}

/* =========================================================
   QUICK USD RATES
   FULL-WIDTH / NO 3-COLUMN GRID
   ========================================================= */

.currency-quick-rates {
    width: 100%;
    box-sizing: border-box;
    margin-top: 14px;
}


/* =========================================================
   HEADER
   ========================================================= */

.quick-rates-header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
    box-sizing: border-box;
}

.quick-rates-title {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
    flex: 1;
}

.quick-rates-icon {
    width: 30px;
    height: 30px;
    min-width: 30px;

    display: flex;
    align-items: center;
    justify-content: center;

    color: var(--currency-green);
    font-size: 14px;

    background: rgba(56, 229, 140, 0.08);
    border: 1px solid rgba(56, 229, 140, 0.18);
    border-radius: 7px;
}

.quick-rates-title > div {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.quick-rates-eyebrow {
    color: #66666f;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 0.1em;
}

.quick-rates-title strong {
    color: #e5e5ea;
    font-size: 13px;
    font-weight: 750;
    line-height: 1.2;
}


/* =========================================================
   LIVE BADGE
   ========================================================= */

                    .quick-rates-live {
                        flex-shrink: 0;

                        display: inline-flex;
                        align-items: center;
                        gap: 5px;

                        padding: 5px 8px;

                        color: var(--currency-green);
                                    font-size: 8px;
                                    font-weight: 800;
                                    letter-spacing: 0.08em;

                                    background: rgba(56, 229, 140, 0.07);
                                    border: 1px solid rgba(56, 229, 140, 0.18);
                                    border-radius: 6px;
                    }

                .quick-rates-live::before {
                content: "";

                width: 5px;
                height: 5px;

                background: var(--currency-green);
                border-radius: 50%;

                box-shadow:
                    0 0 7px rgba(56, 229, 140, 0.8);
            }


/* =========================================================
   STATUS COLORS
   ========================================================= */

.currency-status-dot.loading {
    background: #ffb020;

    box-shadow:
        0 0 8px rgba(255, 176, 32, 0.6);
}

.currency-status-dot.error,
.currency-status-dot.offline {
    background: var(--currency-red);

    box-shadow:
        0 0 8px rgba(255, 48, 48, 0.65);
}


/* =========================================================
   STATUS PULSE
   ========================================================= */

@keyframes currencyStatusPulse {

    0% {
        transform: scale(0.7);
        opacity: 0.8;
    }

    70% {
        transform: scale(1.5);
        opacity: 0;
    }

    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}


/* =========================================================
   VERY NARROW SIDEBARS
   ========================================================= */

@media (max-width: 360px) {

    .quick-rates-header {
        align-items: flex-start;
    }

    .quick-rates-live {
        padding: 4px 6px;
        font-size: 7px;
    }

    .quick-rate {
        padding: 10px;
    }

    .quick-rate-value {
        min-width: 65px;
        font-size: 16px;
    }
}
/* =========================================================
   INPUT / BUTTON ACCESSIBILITY
   ========================================================= */

.sidebar-currency-converter button,
.sidebar-currency-converter input {
    -webkit-tap-highlight-color: transparent;
}


.sidebar-currency-converter button:focus-visible {
    outline: 2px solid rgba(255, 48, 48, 0.7);
    outline-offset: 2px;
}


/* =========================================================
   ANIMATIONS
   ========================================================= */

@keyframes currencyPulse {

    0%,
    100% {
        opacity: 0.55;
        transform: scale(0.85);
    }

    50% {
        opacity: 1;
        transform: scale(1.15);
    }
}


@keyframes currencyStatusPulse {

    0% {
        opacity: 0.8;
        transform: scale(0.65);
    }

    70% {
        opacity: 0;
        transform: scale(1.7);
    }

    100% {
        opacity: 0;
        transform: scale(1.7);
    }
}


@keyframes currencyPanelIn {

    from {
        opacity: 0;
        transform: translateY(-5px) scale(0.985);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}


/* =========================================================
   RESPONSIVE — SMALL SIDEBARS
   ========================================================= */

@media (max-width: 420px) {

    .sidebar-currency-converter {
        padding: 16px;
        border-radius: 15px;
    }

    .currency-header {
        margin-bottom: 16px;
    }

    .currency-header h3 {
        font-size: 15px;
    }

    .currency-icon {
        width: 34px;
        height: 34px;
        flex-basis: 34px;
    }

    .currency-conversion-row {
        grid-template-columns:
            minmax(0, 1fr)
            30px
            minmax(0, 1fr);

        gap: 6px;
    }

    .currency-search-trigger {
        min-height: 50px;

        padding-left: 9px;
        padding-right: 29px;
    }

    .currency-search-code {
        min-width: 34px;
        height: 24px;

        font-size: 9px;
    }

    .currency-search-name {
        margin-left: 5px;

        font-size: 9px;
    }

    .currency-swap {
        width: 30px;
        height: 30px;

        margin-bottom: 9px;

        font-size: 15px;
    }

    .currency-quick-rates {
        gap: 4px;
    }

    .quick-rate {
        padding: 8px 5px;
    }
}


/* =========================================================
   RESPONSIVE — VERY NARROW SIDEBAR
   ========================================================= */

@media (max-width: 330px) {

    .sidebar-currency-converter {
        padding: 13px;
    }

    .currency-conversion-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .currency-swap {
        margin: -3px auto;

        transform: rotate(90deg);
    }

    .currency-swap:hover {
        transform: rotate(270deg);
    }

    .currency-search-panel {
        position: fixed;

        top: 50%;
        left: 50%;

        width: calc(100vw - 28px);
        max-width: 320px;

        transform: translate(-50%, -50%);

        box-shadow:
            0 30px 80px rgba(0, 0, 0, 0.85),
            0 0 35px rgba(255, 48, 48, 0.10);
    }

    .currency-search-panel[hidden] {
        display: none;
    }

    .currency-quick-rates {
        grid-template-columns: 1fr;
    }

    .quick-rate {
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .quick-rate strong {
        margin-top: 0;
    }
}


/* =========================================================
   REDUCE MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    .sidebar-currency-converter *,
    .sidebar-currency-converter *::before,
    .sidebar-currency-converter *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
/* ---------------------------------------------------------
   RATE GRID
   --------------------------------------------------------- */

.quick-rates-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

/* =========================================================
   FUTURISTIC ANIMATED RATE CARDS
   ========================================================= */

.quick-rate {
    position: relative;

    width: 100%;
    min-width: 0;
    min-height: 68px;

    padding: 11px 12px;
    box-sizing: border-box;

    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;

    column-gap: 12px;
    row-gap: 3px;

    background:
        linear-gradient(
            145deg,
            rgba(255,255,255,0.04),
            rgba(255,255,255,0.01)
        );

    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 10px;

    overflow: hidden;

    animation:
        rateCardPulse 3.5s ease-in-out infinite;

    transition:
        transform 0.25s ease,
        border-color 0.25s ease,
        box-shadow 0.25s ease,
        background 0.25s ease;
}


/* ---------------------------------------------------------
   GLOWING TOP LINE
   --------------------------------------------------------- */

.quick-rate::before {
    content: "";

    position: absolute;

    top: 0;
    left: -100%;

    width: 100%;
    height: 1px;

    background:
        linear-gradient(
            90deg,
            transparent,
            #ff3b3b,
            #55d982,
            transparent
        );

    box-shadow:
        0 0 8px rgba(255,59,59,0.7);

    animation:
        rateScanLine 3s linear infinite;
}


/* ---------------------------------------------------------
   SCANNING LIGHT
   --------------------------------------------------------- */

.quick-rate::after {
    content: "";

    position: absolute;

    top: -100%;
    left: 0;

    width: 100%;
    height: 35%;

    background:
        linear-gradient(
            to bottom,
            transparent,
            rgba(255,59,59,0.06),
            transparent
        );

    pointer-events: none;

    animation:
        rateScan 4s ease-in-out infinite;
}


/* ---------------------------------------------------------
   HOVER
   --------------------------------------------------------- */

.quick-rate:hover {
    transform: translateY(-2px) scale(1.01);

    border-color:
        rgba(255,59,59,0.45);

    background:
        linear-gradient(
            145deg,
            rgba(255,59,59,0.08),
            rgba(85,217,130,0.025)
        );

    box-shadow:
        0 0 12px rgba(255,59,59,0.12),
        0 8px 22px rgba(0,0,0,0.3);
}


/* =========================================================
   BLINKING / PULSE
   ========================================================= */

@keyframes rateCardPulse {

    0% {
        border-color: rgba(255,255,255,0.07);

        box-shadow:
            0 0 0 rgba(255,59,59,0);
    }

    45% {
        border-color: rgba(255,59,59,0.16);

        box-shadow:
            0 0 8px rgba(255,59,59,0.06);
    }

    50% {
        border-color: rgba(255,59,59,0.30);

        box-shadow:
            0 0 14px rgba(255,59,59,0.10);
    }

    55% {
        border-color: rgba(255,59,59,0.16);

        box-shadow:
            0 0 8px rgba(255,59,59,0.06);
    }

    100% {
        border-color: rgba(255,255,255,0.07);

        box-shadow:
            0 0 0 rgba(255,59,59,0);
    }
}


/* =========================================================
   MOVING SCAN LINE
   ========================================================= */

@keyframes rateScanLine {

    0% {
        left: -100%;
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    45% {
        left: 100%;
        opacity: 1;
    }

    50% {
        opacity: 0;
    }

    100% {
        left: 100%;
        opacity: 0;
    }
}


/* =========================================================
   SCANNING EFFECT
   ========================================================= */

@keyframes rateScan {

    0% {
        top: -40%;
        opacity: 0;
    }

    15% {
        opacity: 1;
    }

    50% {
        top: 110%;
        opacity: 0;
    }

    100% {
        top: 110%;
        opacity: 0;
    }
}

/* =========================================================
   CURRENCY LIVE STATUS
   ========================================================= */

.currency-update {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;

    margin-top: 10px;
    padding: 10px 12px;

    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 9px;

    overflow: hidden;
}

/* Left side */
.currency-status-left {
    min-width: 0;

    display: flex;
    align-items: center;
    gap: 9px;
}

/* Status dot */
.currency-status-dot {
    position: relative;

    width: 8px;
    height: 8px;
    min-width: 8px;

    border-radius: 50%;
    background: #55d982;

    box-shadow:
        0 0 5px rgba(85, 217, 130, 0.7),
        0 0 12px rgba(85, 217, 130, 0.35);

    animation: currencyStatusPulse 2s ease-in-out infinite;
}

/* Outer glowing ring */
.currency-status-dot::after {
    content: "";

    position: absolute;
    inset: -4px;

    border-radius: 50%;
    border: 1px solid rgba(85, 217, 130, 0.35);

    animation: currencyStatusRing 2s ease-out infinite;
}

/* Status text */
.currency-status-text {
    min-width: 0;

    display: flex;
    flex-direction: column;
    gap: 2px;
}

.currency-status-text strong {
    font-family: "Space Grotesk", sans-serif;
    font-size: 10px;
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;

    color: rgba(255, 255, 255, 0.75);
}

.currency-status-text span {
    min-width: 0;

    font-family: "Space Grotesk", sans-serif;
    font-size: 10px;
    line-height: 1.3;

    color: rgba(255, 255, 255, 0.48);

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Right signal */
.currency-status-signal {
    flex-shrink: 0;

    font-size: 8px;
    color: #55d982;

    text-shadow:
        0 0 5px rgba(85, 217, 130, 0.8),
        0 0 10px rgba(85, 217, 130, 0.4);

    animation: currencySignalBlink 1.8s ease-in-out infinite;
}


/* =========================================================
   LIVE / DEFAULT STATE
   ========================================================= */

.currency-update.live .currency-status-dot {
    background: #55d982;

    box-shadow:
        0 0 5px rgba(85, 217, 130, 0.8),
        0 0 14px rgba(85, 217, 130, 0.4);
}

.currency-update.live .currency-status-signal {
    color: #55d982;
}


/* =========================================================
   UPDATING STATE
   ========================================================= */

.currency-update.updating .currency-status-dot {
    background: #f5c84b;

    box-shadow:
        0 0 5px rgba(245, 200, 75, 0.8),
        0 0 14px rgba(245, 200, 75, 0.4);

    animation:
        currencyStatusPulse 0.8s ease-in-out infinite,
        currencyUpdatingSpin 1.2s linear infinite;
}

.currency-update.updating .currency-status-dot::after {
    border-color: rgba(245, 200, 75, 0.4);
}

.currency-update.updating .currency-status-signal {
    color: #f5c84b;

    animation: currencySignalBlink 0.7s ease-in-out infinite;
}


/* =========================================================
   SAVED / CACHE STATE
   ========================================================= */

.currency-update.saved .currency-status-dot {
    background: #55a8ff;

    box-shadow:
        0 0 5px rgba(85, 168, 255, 0.8),
        0 0 14px rgba(85, 168, 255, 0.4);

    animation: currencyStatusPulse 2.5s ease-in-out infinite;
}

.currency-update.saved .currency-status-dot::after {
    border-color: rgba(85, 168, 255, 0.35);
}

.currency-update.saved .currency-status-signal {
    color: #55a8ff;
}


/* =========================================================
   OFFLINE / FALLBACK STATE
   ========================================================= */

.currency-update.offline .currency-status-dot {
    background: #ff5f5f;

    box-shadow:
        0 0 5px rgba(255, 95, 95, 0.8),
        0 0 14px rgba(255, 95, 95, 0.35);

    animation: currencyOfflinePulse 1.8s ease-in-out infinite;
}

.currency-update.offline .currency-status-dot::after {
    border-color: rgba(255, 95, 95, 0.3);
}

.currency-update.offline .currency-status-signal {
    color: #ff5f5f;

    animation: currencySignalBlink 1.2s ease-in-out infinite;
}


/* =========================================================
   ERROR STATE
   ========================================================= */

.currency-update.error .currency-status-dot {
    background: #ff8a4c;

    box-shadow:
        0 0 5px rgba(255, 138, 76, 0.8),
        0 0 14px rgba(255, 138, 76, 0.35);

    animation: currencyErrorPulse 0.9s ease-in-out infinite;
}

.currency-update.error .currency-status-dot::after {
    border-color: rgba(255, 138, 76, 0.3);
}

.currency-update.error .currency-status-signal {
    color: #ff8a4c;
}


/* =========================================================
   ANIMATIONS
   ========================================================= */

@keyframes currencyStatusPulse {
    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.18);
        opacity: 0.72;
    }
}

@keyframes currencyStatusRing {
    0% {
        transform: scale(0.7);
        opacity: 0.8;
    }

    70% {
        transform: scale(1.35);
        opacity: 0;
    }

    100% {
        transform: scale(1.35);
        opacity: 0;
    }
}

@keyframes currencySignalBlink {
    0%,
    100% {
        opacity: 0.35;
    }

    50% {
        opacity: 1;
    }
}

@keyframes currencyUpdatingSpin {
    0% {
        transform: scale(1) rotate(0deg);
    }

    50% {
        transform: scale(1.2) rotate(180deg);
    }

    100% {
        transform: scale(1) rotate(360deg);
    }
}

@keyframes currencyOfflinePulse {
    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.45;
    }
}

@keyframes currencyErrorPulse {
    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.25);
    }
}


/* =========================================================
   MOBILE / NARROW SIDEBAR
   ========================================================= */

@media (max-width: 340px) {

    .currency-update {
        padding: 9px 10px;
        gap: 7px;
    }

    .currency-status-left {
        gap: 7px;
    }

    .currency-status-text strong {
        font-size: 9px;
    }

    .currency-status-text span {
        font-size: 9px;
    }

    .currency-status-signal {
        font-size: 7px;
    }
}


/* =========================================================
   ACCESSIBILITY
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    .currency-status-dot,
    .currency-status-dot::after,
    .currency-status-signal {
        animation: none !important;
    }
}

