/* ============================================================
   Forex Broker Compare — fbc-styles.css
   Dark design — v1.0.0
   ============================================================ */

/* ---- Reset & wrapper ---- */
.fbc-wrap *,
.fbc-wrap *::before,
.fbc-wrap *::after { box-sizing: border-box; margin: 0; padding: 0; }

.fbc-wrap {
    background: #0e0f11;
    border-radius: 14px;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #e2e4ea;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ---- Section heading ---- */
.fbc-section-head {
    font-size: 10px;
    font-weight: 500;
    color: #4b5563;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 8px;
    padding-left: 2px;
}

/* ---- Shared card block ---- */
.fbc-compare-block {
    background: #1a1d24;
    border: 0.5px solid #242830;
    border-radius: 12px;
    overflow: hidden;
}

/* ================================================================
   SECTION: Overall score header
   ================================================================ */
.fbc-score-header {
    display: grid;
    grid-template-columns: 1fr 84px 1fr;
    gap: 8px;
    align-items: stretch;
}

.fbc-score-card {
    background: #1a1d24;
    border: 0.5px solid #242830;
    border-radius: 12px;
    padding: 14px 16px;
    position: relative;
}

.fbc-score-card.fbc-winner {
    border: 1px solid #1D9E75;
}

.fbc-winner-pill {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: #0F6E56;
    color: #9FE1CB;
    font-size: 9px;
    font-weight: 500;
    padding: 3px 10px;
    border-radius: 20px;
    white-space: nowrap;
    border: 0.5px solid #1D9E75;
}

.fbc-sc-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.fbc-sc-logo {
    width: 30px;
    height: 30px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 500;
    flex-shrink: 0;
}
.fbc-sc-logo-a { background: #0F6E56; color: #9FE1CB; }
.fbc-sc-logo-b { background: #0C447C; color: #B5D4F4; }

.fbc-logo-img {
    width: 30px;
    height: 30px;
    border-radius: 6px;
    object-fit: contain;
}

.fbc-sc-broker { font-size: 13px; font-weight: 500; color: #e2e4ea; }
.fbc-sc-reg    { font-size: 10px; color: #6b7280; margin-top: 1px; }
.fbc-big-score { font-size: 32px; font-weight: 500; color: #e2e4ea; line-height: 1; }

.fbc-stars-row { display: flex; gap: 2px; margin: 4px 0; }
.fbc-star {
    width: 12px;
    height: 12px;
    clip-path: polygon(50% 0%,61% 35%,98% 35%,68% 57%,79% 91%,50% 70%,21% 91%,32% 57%,2% 35%,39% 35%);
}
.fbc-star-full  { background: #EF9F27; }
.fbc-star-half  { background: #6b4c10; }
.fbc-star-empty { background: #2d3139; }

.fbc-sc-label { font-size: 10px; color: #6b7280; }

.fbc-verdict-mid {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.fbc-verdict-tag {
    background: #0F6E56;
    color: #9FE1CB;
    font-size: 9px;
    font-weight: 500;
    padding: 5px 8px;
    border-radius: 4px;
    text-align: center;
    line-height: 1.4;
}

.fbc-updated { font-size: 9px; color: #374151; text-align: center; }

/* ================================================================
   SECTION: Quick stats
   ================================================================ */
.fbc-qstat-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.fbc-qstat-box {
    background: #1a1d24;
    border: 0.5px solid #242830;
    border-radius: 10px;
    padding: 12px 14px;
}

.fbc-qstat-label {
    font-size: 10px;
    color: #6b7280;
    margin-bottom: 8px;
    font-weight: 500;
    letter-spacing: 0.04em;
}

.fbc-qstat-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
}

.fbc-qs-item {
    text-align: center;
    padding: 7px 4px;
    background: #13151a;
    border-radius: 6px;
}

.fbc-qs-val { font-size: 12px; font-weight: 500; color: #e2e4ea; }
.fbc-qs-key { font-size: 9px; color: #4b5563; margin-top: 2px; }

.fbc-side-a .fbc-qs-item:nth-child(1) .fbc-qs-val,
.fbc-side-a .fbc-qs-item:nth-child(2) .fbc-qs-val { color: #1D9E75; }
.fbc-side-b .fbc-qs-item:nth-child(3) .fbc-qs-val { color: #378ADD; }

/* ================================================================
   SECTION: Category ratings
   ================================================================ */
.fbc-rating-row {
    display: grid;
    grid-template-columns: 1fr 120px 1fr;
    align-items: center;
    padding: 11px 16px;
    border-bottom: 0.5px solid #1e2128;
}
.fbc-rating-row:last-child { border-bottom: none; }

/* LEFT side: score number flush left, bar after it */
.fbc-left-side {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
}

/* RIGHT side: score number flush right (outer), bar between center and number */
.fbc-right-side {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.fbc-bar-track {
    height: 4px;
    width: 72px;
    background: #242830;
    border-radius: 2px;
    overflow: hidden;
    flex-shrink: 0;
}

.fbc-bar-fill { height: 4px; border-radius: 2px; }
.fbc-fill-g   { background: #1D9E75; }
.fbc-fill-b   { background: #378ADD; }

.fbc-score-n   { font-size: 13px; font-weight: 500; min-width: 26px; }
.fbc-g         { color: #1D9E75; }
.fbc-b         { color: #378ADD; text-align: right; }

.fbc-row-cat {
    font-size: 11px;
    color: #6b7280;
    text-align: center;
    line-height: 1.4;
    padding: 0 4px;
}

.fbc-win-dot {
    display: inline-block;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    margin-left: 3px;
    vertical-align: middle;
}
.fbc-dot-a { background: #1D9E75; }
.fbc-dot-b { background: #378ADD; }

/* ================================================================
   SECTION: Key facts
   ================================================================ */
.fbc-fact-row {
    display: grid;
    grid-template-columns: 1fr 110px 1fr;
    align-items: center;
    padding: 10px 16px;
    border-bottom: 0.5px solid #1e2128;
}
.fbc-fact-row:last-child { border-bottom: none; }

.fbc-fact-val  { font-size: 12px; font-weight: 500; color: #e2e4ea; }
.fbc-fact-left { text-align: right; }
.fbc-fact-right{ text-align: left; }
.fbc-fact-cat  { font-size: 10px; color: #4b5563; text-align: center; padding: 0 6px; }

/* ================================================================
   SECTION: Instruments
   ================================================================ */
.fbc-inst-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.fbc-inst-box {
    background: #1a1d24;
    border: 0.5px solid #242830;
    border-radius: 12px;
    padding: 14px 16px;
}

.fbc-inst-head { font-size: 12px; font-weight: 500; color: #9ca3af; margin-bottom: 10px; }

.fbc-inst-tags { display: flex; flex-wrap: wrap; gap: 5px; }

.fbc-inst-tag {
    font-size: 10px;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 500;
}

.fbc-tag-yes { background: #0a1f18; color: #1D9E75; border: 0.5px solid #0F6E56; }
.fbc-tag-no  { background: #1a1d24; color: #374151; border: 0.5px solid #242830; }

/* ================================================================
   SECTION: Platforms
   ================================================================ */
.fbc-plat-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.fbc-plat-box {
    background: #1a1d24;
    border: 0.5px solid #242830;
    border-radius: 12px;
    padding: 14px 16px;
}

.fbc-plat-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 0.5px solid #1e2128;
}
.fbc-plat-item:last-child { border-bottom: none; }

.fbc-plat-name { font-size: 12px; color: #9ca3af; }

.fbc-plat-check {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 500;
    flex-shrink: 0;
}

.fbc-chk-y { background: #0a1f18; color: #1D9E75; border: 0.5px solid #0F6E56; }
.fbc-chk-n { background: #1e2128; color: #374151; border: 0.5px solid #2d3139; }

/* ================================================================
   SECTION: Pros & cons
   ================================================================ */
.fbc-pros-cons-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.fbc-pc-box {
    background: #1a1d24;
    border: 0.5px solid #242830;
    border-radius: 12px;
    padding: 14px 16px;
}

.fbc-pc-head {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
}

.fbc-pc-logo-sm {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8px;
    font-weight: 500;
    flex-shrink: 0;
}
.fbc-pc-logo-a { background: #0F6E56; color: #9FE1CB; }
.fbc-pc-logo-b { background: #0C447C; color: #B5D4F4; }

.fbc-pc-broker { font-size: 12px; font-weight: 500; color: #9ca3af; }

.fbc-pc-item {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    padding: 5px 0;
    border-bottom: 0.5px solid #1e2128;
}
.fbc-pc-item:last-child { border-bottom: none; }

.fbc-pc-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    margin-top: 4px;
    flex-shrink: 0;
}
.fbc-dot-g { background: #1D9E75; }
.fbc-dot-r { background: #E24B4A; }

.fbc-pc-text { font-size: 11px; color: #9ca3af; line-height: 1.4; }

/* ================================================================
   SECTION: Final verdict
   ================================================================ */
.fbc-verdict-full {
    background: #0a1f18;
    border: 0.5px solid #0F6E56;
    border-radius: 12px;
    padding: 16px;
}

.fbc-verdict-row {
    display: grid;
    grid-template-columns: 1fr 1px 1fr;
    gap: 16px;
    align-items: start;
}

.fbc-vf-divider { background: #0F6E56; align-self: stretch; }

.fbc-vf-head {
    font-size: 11px;
    font-weight: 500;
    color: #1D9E75;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.fbc-vf-text { font-size: 11px; color: #9ca3af; line-height: 1.6; }

/* ================================================================
   SECTION: CTA
   ================================================================ */
.fbc-cta-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.fbc-cta-btn {
    display: block;
    text-align: center;
    padding: 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: opacity 0.15s;
}
.fbc-cta-btn:hover { opacity: 0.88; }

.fbc-cta-a { background: #1D9E75; color: #E1F5EE; }
.fbc-cta-b { background: #185FA5; color: #E6F1FB; }

.fbc-risk-note {
    font-size: 10px;
    color: #374151;
    text-align: center;
    margin-top: 4px;
    line-height: 1.5;
}

/* ---- Error ---- */
.fbc-error {
    color: #E24B4A;
    font-size: 13px;
    padding: 12px;
    border: 0.5px solid #E24B4A;
    border-radius: 8px;
}

/* ================================================================
   Responsive — narrow screens
   ================================================================ */
@media (max-width: 600px) {
    .fbc-score-header  { grid-template-columns: 1fr; }
    .fbc-verdict-mid   { display: none; }
    .fbc-rating-row    { grid-template-columns: 1fr 90px 1fr; padding: 9px 10px; }
    .fbc-bar-track     { width: 50px; }
    .fbc-fact-row      { grid-template-columns: 1fr 80px 1fr; padding: 8px 10px; }
    .fbc-qstat-grid,
    .fbc-inst-grid,
    .fbc-plat-grid,
    .fbc-pros-cons-grid { grid-template-columns: 1fr; }
    .fbc-verdict-row   { grid-template-columns: 1fr; }
    .fbc-vf-divider    { display: none; }
    .fbc-cta-grid      { grid-template-columns: 1fr; }
}


/* =====================================================================
   FBC — Mode B: Interactive broker selector
   ===================================================================== */

.fbc-selector-wrap {
    max-width: 860px;
    margin: 0 auto 2rem;
    font-family: inherit;
}

/* Header */
.fbc-selector-header {
    text-align: center;
    margin-bottom: 1.5rem;
}
.fbc-selector-title {
    font-size: 1.6rem;
    font-weight: 700;
    margin: 0 0 .35rem;
    color: #1a1a2e;
}
.fbc-selector-sub {
    font-size: .95rem;
    color: #6b7280;
    margin: 0;
}

/* Controls row */
.fbc-selector-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 1rem;
    background: #f8f9ff;
    border: 1px solid #e5e7f0;
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
}

.fbc-selector-field {
    flex: 1 1 200px;
    display: flex;
    flex-direction: column;
    gap: .4rem;
}
.fbc-selector-field label {
    font-size: .8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #374151;
}

.fbc-sel-dropdown {
    width: 100%;
    padding: .65rem .9rem;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    font-size: .95rem;
    background: #fff;
    color: #111827;
    cursor: pointer;
    transition: border-color .2s;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right .75rem center;
    padding-right: 2.2rem;
}
.fbc-sel-dropdown:focus {
    outline: none;
    border-color: #ff5147;
    box-shadow: 0 0 0 3px rgba(255,81,71,.15);
}

/* VS divider */
.fbc-selector-vs {
    flex: 0 0 auto;
    font-size: 1.1rem;
    font-weight: 800;
    color: #ff5147;
    align-self: flex-end;
    padding-bottom: .65rem;
    letter-spacing: .05em;
}

/* Compare button */
.fbc-sel-btn {
    flex: 0 0 auto;
    align-self: flex-end;
    padding: .7rem 1.5rem;
    background: #ff5147;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: .95rem;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s, opacity .2s, transform .1s;
    white-space: nowrap;
}
.fbc-sel-btn:hover:not(:disabled) {
    background: #e03e35;
    transform: translateY(-1px);
}
.fbc-sel-btn:disabled {
    opacity: .45;
    cursor: not-allowed;
}

/* Spinner / loader */
.fbc-sel-loader {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .75rem;
    padding: 2rem 0;
    color: #6b7280;
    font-size: .95rem;
}
.fbc-spinner {
    width: 26px;
    height: 26px;
    border: 3px solid #e5e7eb;
    border-top-color: #ff5147;
    border-radius: 50%;
    animation: fbc-spin .7s linear infinite;
}
@keyframes fbc-spin {
    to { transform: rotate(360deg); }
}

/* Result container */
.fbc-sel-result {
    margin-top: 1.5rem;
}

/* Error */
.fbc-error {
    color: #b91c1c;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: .75rem 1rem;
    font-size: .9rem;
    margin: .5rem 0;
}

/* Mobile */
@media (max-width: 600px) {
    .fbc-selector-controls {
        flex-direction: column;
        padding: 1rem;
    }
    .fbc-selector-vs {
        align-self: center;
        padding-bottom: 0;
    }
    .fbc-sel-btn {
        width: 100%;
        text-align: center;
    }
}
