/* === Wrapper ============================================================= */
.wsc-fx {
    padding: 16px 0;
    background: transparent;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    margin: 0 auto;
    color: #111827;
}

/* Simple pane spacing */
.wsc-fx-simple {
    border: 0;
    padding: 0;
}

/* Field block */
.wsc-fx-field {
    display: block;
    margin-bottom: 15px;
}
.wsc-fx-label {
    display: block;
    font-weight: 600;
    margin: 0 0 8px 2px;
}

/* Input wrapper with currency prefix */
.wsc-fx-inputwrap { position: relative; }
.wsc-fx-prefix {
    position: absolute;
    top: 50%;
    left: 14px;
    transform: translateY(-50%);
    font-size: 1rem;
    color: #374151;
    pointer-events: none;
    min-width: 24px;
    text-align: left;
}
.wsc-fx-inputwrap.has-symbol .wsc-fx-amount { padding-left: 42px !important; }

/* Inputs & dropdowns share look (big, comfy) */
.wsc-fx-amount,
.wsc-fx-select {
    width: 100% !important;
    color: #111827 !important;
    border-radius: 5px !important;
    background: #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
    box-sizing: border-box;
    height: 64px !important;
    font-size: 18px;
}
.wsc-fx-amount { padding: 12px 16px; }
.wsc-fx-select { padding: 12px 16px; appearance: none; background-image: none; }

/* Flag badge inside select (left) */
.wsc-fx-select.wsc-fx-select-has-flag {
    padding-left: 56px;
    background-image: var(--wsc-flag-url);
    background-repeat: no-repeat;
    background-size: 28px 28px;
    background-position: 16px center;
}

/* === Stacked From/To with two centered floating buttons ================== */
.wsc-fx-fromto {
    /* Button sizing & math */
    --btn-size: 64px;             /* button width/height */
    --btn-gap: 15px;              /* space BETWEEN the two buttons */
    --pair-offset: calc((var(--btn-size) + var(--btn-gap)) / 2); /* center-to-center half distance */

    position: relative;
    display: grid;
    grid-template-columns: 1fr;   /* stacked selects */
    row-gap: 0;
    margin: 8px 0 15px;
}

/* Keep labels tight in this section */
.wsc-fx-fromto .wsc-fx-field .wsc-fx-label { margin: 0 0 8px 2px; }

/* Base floating button style (swap & add) */
.wsc-fx-swap-round,
.wsc-fx-addcombo,
.wsc-fx-savecombo.wsc-fx-swap {
    position: absolute;
    top: calc(50% + 13px);  /* nudge down to sit between selects accounting for label height */
    transform: translate(-50%, -50%);
    width: var(--btn-size);
    height: var(--btn-size);
    border-radius: 5px;
    border: 1px solid #e5e7eb;
    background: #fff;
    box-shadow: 0 8px 18px rgba(0,0,0,.10);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 25px;
    font-weight: 500;
    cursor: pointer;
    z-index: 3;
}
.wsc-fx-swap-round:focus,
.wsc-fx-addcombo:focus,
.wsc-fx-savecombo.wsc-fx-swap:focus { outline: 3px solid #2563eb; outline-offset: 2px; }

/* Position the two buttons symmetrically about center with 15px gap */
.wsc-fx-swap-round { left: calc(50% - var(--pair-offset)); }                       /* left button */
.wsc-fx-addcombo,
.wsc-fx-savecombo.wsc-fx-swap { left: calc(50% + var(--pair-offset)); }            /* right button */

/* Big result style */
.wsc-fx-result,
.wsc-fx-amount {
    font-size: 28px !important;
    font-weight: 500 !important;
}

/* If the old bottom row still exists, hide it (we now use the + button above) */
.wsc-fx-actions-row { display: none; }

/* Inline flag img (meta & lists) */
.wsc-fx-flag {
    width: 20px;
    height: 20px;
    border-radius: 999px;
    object-fit: cover;
    vertical-align: -3px;
    margin-right: 5px;
}

/* Cards row (popular + saved) */
.wsc-fx-cards {
    gap: 16px;
    align-items: start;
    margin-top: 25px;
}
.wsc-fx-card {
    border: 1px solid #e5e7eb;
    border-radius: 5px;
    background: #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,.04);
    padding: 12px 14px;
}
.wsc-fx-card-title {
    margin: 0 0 10px 0 !important;
    font-size: 1.1rem;
}
.wsc-fx-quick-table tr:last-child td { border-bottom: none; }
.wsc-fx-quick-table .lbl { white-space: nowrap; }

/* Saved combos */
.wsc-fx-saved-wrap { display: flex; flex-wrap: wrap; gap: 10px; }
.wsc-fx-saved-empty { margin: 6px 0 4px; color: #6b7280; font-size: 0.95rem; }
.wsc-fx-pill {
    border: 1px solid #e5e7eb;
    background: #f8fafc;
    border-radius: 5px;
    padding: 6px 10px;
    cursor: pointer;
    line-height: 1.2;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
}
.wsc-fx-pill-remove {
    position: relative;
    top: -5px;
    transform: translate(50%, -50%);
    background: #fe5757;
    color: #fff;
    width: 19px;
    height: 19px;
    line-height: 15px;
    text-align: center;
    border-radius: 50%;
    font-weight: 500;
    cursor: pointer;
    right: -10px;
}

/* === Mini card =========================================================== */
.wsc-fx-mini { font-family: inherit; }
.wsc-fx-mini-card {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,.04);
    padding: 16px;
    text-align: center;
}

/* Compact two-row layout for inputs in mini */
.wsc-fx-mini-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 10px;
}
.wsc-fx-mini .wsc-fx-amount {
    height: 54px !important;   /* smaller than full */
    font-size: 17px !important;
}

/* Labels inline codes (USD/EUR) */
.wsc-fx-mini-base-code,
.wsc-fx-mini-target-code { color:#6b7280; font-weight: 500; }

.wsc-fx-mini-line {
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
    text-align: left;
    margin: 15px 0 10px;
    line-height: 30px;
}
.wsc-fx-mini-updated { margin-top: 6px; color: #667085; font-style: italic; font-size: 0.95rem; }
.wsc-fx-mini-actions { margin-top: 8px; text-align: center; }
.wsc-fx-mini-change { text-decoration: none; }

/* Attribution */
.wsc-fx-attr {
    margin: 15px 0 0 5px;
    font-size: 0.8rem;
    color: #777;
}
.wsc-fx-heading {
    font-weight: 500;
}

/* Responsive */
@media (max-width: 860px) {
    .wsc-fx-cards { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
    .wsc-fx-fromto { --btn-size: 56px; }
    .wsc-fx-amount, .wsc-fx-select { height: 58px !important; }
}