/* ═══════════════════════════════════════════════════
   FXDetails Broker Review Styles
   ═══════════════════════════════════════════════════ */

/* ── Broker Identity Header ── */
.fxd-broker-identity {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 16px;
}

.fxd-broker-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
    background: #fff;
    border: 1px solid var(--fx-border);
    border-radius: var(--fx-radius);
    padding: 6px;
    flex-shrink: 0;
}

.fxd-broker-info {
    flex: 1;
    min-width: 0;
}

.fxd-broker-name {
    font-size: var(--fx-font-xl);
    font-weight: 700;
    margin-bottom: 4px;
}

.fxd-broker-rating-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.fxd-broker-score-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--fx-accent);
    color: #fff;
    font-size: var(--fx-font-md);
    font-weight: 700;
    padding: 2px 8px;
    border-radius: var(--fx-radius-sm);
    min-width: 36px;
}

.fxd-broker-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.fxd-broker-tag {
    display: inline-flex;
    align-items: center;
    padding: 1px 6px;
    font-size: 10px;
    font-weight: 600;
    border-radius: 2px;
    background: rgba(74, 144, 217, 0.12);
    color: #4a90d9;
}

.fxd-broker-cta-main {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    flex-shrink: 0;
}

.fxd-broker-cta-main .fx-btn {
    padding: 10px 24px;
    font-size: var(--fx-font-md);
}

.fxd-broker-cta-main .fxd-cta-note {
    font-size: 10px;
    color: var(--fx-text-muted);
    text-align: right;
}

/* ── Specs Table ── */
.fxd-broker-specs .fx-table td:first-child {
    font-weight: 600;
    width: 40%;
    color: var(--fx-text-secondary);
    background: rgba(0,0,0,0.02);
}

/* ── Score Bars ── */
.fxd-broker-scores {
    padding: 14px 16px;
}

.fxd-score-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.fxd-score-item:last-child {
    margin-bottom: 0;
}

.fxd-score-label {
    width: 160px;
    font-size: var(--fx-font-sm);
    font-weight: 600;
    flex-shrink: 0;
    color: var(--fx-text);
}

.fxd-score-bar {
    flex: 1;
    height: 8px;
    background: var(--fx-border);
    border-radius: 4px;
    overflow: hidden;
}

.fxd-score-fill {
    height: 100%;
    border-radius: 4px;
    width: 0;
    transition: width 0.8s ease;
}

.fxd-score-value {
    width: 32px;
    text-align: right;
    font-size: var(--fx-font-sm);
    font-weight: 700;
    flex-shrink: 0;
}

/* ── Pros / Cons Grid ── */
.fxd-proscons-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}

.fxd-proscons-col {
    padding: 14px 16px;
}

.fxd-proscons-col:first-child {
    border-right: 1px solid var(--fx-border);
}

.fxd-pros-title,
.fxd-cons-title {
    font-size: var(--fx-font-sm);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    padding-bottom: 6px;
    margin-bottom: 8px;
}

.fxd-pros-title {
    border-bottom: 2px solid var(--fx-success);
    color: var(--fx-success);
}

.fxd-cons-title {
    border-bottom: 2px solid var(--fx-danger);
    color: var(--fx-danger);
}

.fxd-proscons-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.fxd-proscons-list li {
    padding: 4px 0;
    font-size: var(--fx-font-sm);
    line-height: 1.5;
}

/* ── FAQ Accordion ── */
.fxd-faq-list {
    padding: 0;
}

.fxd-faq-item {
    border-bottom: 1px solid var(--fx-border);
}

.fxd-faq-item:last-child {
    border-bottom: none;
}

.fxd-faq-q {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 10px 16px;
    background: transparent;
    background-color: transparent;
    border: none;
    font-size: var(--fx-font-sm);
    font-weight: 600;
    font-family: var(--fx-font);
    color: var(--fx-text);
    cursor: pointer;
    text-align: left;
    transition: background-color var(--fx-transition);
}

.fxd-faq-q:hover,
.fxd-faq-q:focus {
    background-color: var(--fx-bg-hover);
    color: var(--fx-text);
}

.fxd-faq-toggle {
    font-size: 16px;
    font-weight: 400;
    color: var(--fx-text-muted);
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.fxd-faq-item.active .fxd-faq-toggle {
    transform: rotate(45deg);
}

.fxd-faq-a {
    display: none;
    padding: 0 16px 12px;
    font-size: var(--fx-font-sm);
    line-height: 1.6;
    color: var(--fx-text-secondary);
}

.fxd-faq-item.active .fxd-faq-a {
    display: block;
}

/* ── Bottom CTA Panel ── */
.fxd-broker-cta-bottom {
    text-align: center;
    padding: 20px 16px;
}

.fxd-broker-cta-bottom h3 {
    font-size: var(--fx-font-lg);
    margin-bottom: 10px;
}

.fxd-broker-cta-bottom .fx-btn {
    padding: 12px 32px;
    font-size: var(--fx-font-md);
}

.fxd-broker-cta-bottom .fxd-cta-disclaimer {
    font-size: 10px;
    color: var(--fx-text-muted);
    margin-top: 8px;
}

/* ── Sticky CTA Sidebar ── */
.fxd-broker-sticky-cta {
    position: sticky;
    top: 12px;
}

.fxd-sticky-card {
    text-align: center;
    padding: 16px;
}

.fxd-sticky-card .fxd-broker-logo {
    width: 60px;
    height: 60px;
    margin: 0 auto 8px;
    display: block;
}

.fxd-sticky-card .fxd-broker-score-badge {
    font-size: var(--fx-font-xl);
    padding: 4px 12px;
    margin-bottom: 6px;
}

.fxd-sticky-card .fx-btn {
    width: 100%;
    padding: 10px;
    margin-bottom: 8px;
}

.fxd-sticky-specs {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: var(--fx-font-xs);
}

.fxd-sticky-specs li {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    border-bottom: 1px dotted var(--fx-border);
}

.fxd-sticky-specs li:last-child {
    border-bottom: none;
}

.fxd-sticky-specs .fxd-spec-label {
    color: var(--fx-text-muted);
}

.fxd-sticky-specs .fxd-spec-value {
    font-weight: 600;
}

/* ── Ranking Page Cards ── */
.fxd-rank-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--fx-border);
    transition: background var(--fx-transition);
}

.fxd-rank-card:last-child {
    border-bottom: none;
}

.fxd-rank-card:hover {
    background: var(--fx-bg-hover);
}

.fxd-rank-number {
    font-size: var(--fx-font-2xl);
    font-weight: 800;
    color: var(--fx-text-muted);
    width: 32px;
    text-align: center;
    flex-shrink: 0;
}

.fxd-rank-logo {
    width: 48px;
    height: 48px;
    object-fit: contain;
    background: #fff;
    border: 1px solid var(--fx-border);
    border-radius: var(--fx-radius);
    padding: 4px;
    flex-shrink: 0;
}

.fxd-rank-info {
    flex: 1;
    min-width: 0;
}

.fxd-rank-name {
    font-size: var(--fx-font-md);
    font-weight: 700;
    margin-bottom: 2px;
}

.fxd-rank-name a {
    color: var(--fx-text-heading);
}

.fxd-rank-name a:hover {
    color: #0e5094;
}

.fxd-rank-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 10px;
    font-size: var(--fx-font-xs);
    color: var(--fx-text-secondary);
}

.fxd-rank-specs span {
    white-space: nowrap;
}

.fxd-rank-right {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.fxd-rank-score {
    font-size: var(--fx-font-lg);
    font-weight: 800;
    color: var(--fx-accent);
}

.fxd-rank-featured {
    border-left: 3px solid var(--fx-accent);
    background: var(--fx-accent-light);
}

.fxd-rank-featured .fxd-rank-number {
    color: var(--fx-accent);
}

/* ── Comparison Page ── */
.fxd-compare-form {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    flex-wrap: wrap;
}

.fxd-compare-form select {
    flex: 1;
    min-width: 140px;
    padding: 8px 10px;
    border: 1px solid var(--fx-border);
    border-radius: var(--fx-radius);
    font-family: var(--fx-font);
    font-size: var(--fx-font-sm);
    background: var(--fx-bg-input);
}

.fxd-compare-vs {
    font-size: var(--fx-font-lg);
    font-weight: 800;
    color: var(--fx-text-muted);
}

.fxd-compare-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--fx-font-sm);
}

.fxd-compare-table th,
.fxd-compare-table td {
    padding: 8px 12px;
    border: 1px solid var(--fx-border);
    text-align: center;
    vertical-align: middle;
}

.fxd-compare-table th {
    background: var(--fx-bg-panel-alt);
    color: #fff;
    font-size: var(--fx-font-xs);
    font-weight: 600;
    text-transform: uppercase;
}

.fxd-compare-table th:first-child {
    text-align: left;
    width: 30%;
}

.fxd-compare-table td:first-child {
    text-align: left;
    font-weight: 600;
    color: var(--fx-text-secondary);
    background: rgba(0,0,0,0.02);
}

.fxd-compare-winner {
    background: rgba(46, 139, 58, 0.08) !important;
    font-weight: 600;
}

.fxd-compare-logos {
    display: flex;
    justify-content: center;
    gap: 24px;
    padding: 16px;
}

.fxd-compare-broker-head {
    text-align: center;
}

.fxd-compare-broker-head img {
    width: 56px;
    height: 56px;
    object-fit: contain;
    background: #fff;
    border: 1px solid var(--fx-border);
    border-radius: var(--fx-radius);
    padding: 4px;
    display: block;
    margin: 0 auto 6px;
}

.fxd-compare-broker-head .fxd-broker-name {
    font-size: var(--fx-font-md);
}

.fxd-compare-cta {
    display: flex;
    justify-content: center;
    gap: 16px;
    padding: 16px;
}

.fxd-compare-cta .fx-btn {
    min-width: 160px;
}

/* Star half */
.fxd-star-half {
    position: relative;
    display: inline-block;
    overflow: hidden;
    width: 0.55em;
}

/* ── Deposit/Withdrawal section ── */
.fxd-broker-deposit .fx-table td:first-child {
    font-weight: 600;
    width: 40%;
    color: var(--fx-text-secondary);
    background: rgba(0,0,0,0.02);
}

/* ── Article content inside broker review ── */
.fxd-broker-article-content {
    padding: 16px;
    font-size: var(--fx-font-sm);
    line-height: 1.7;
}

.fxd-broker-article-content h2 {
    font-size: var(--fx-font-lg);
    margin: 18px 0 8px;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--fx-border);
}

.fxd-broker-article-content h3 {
    font-size: var(--fx-font-md);
    margin: 14px 0 6px;
}

.fxd-broker-article-content p {
    margin: 0 0 10px;
}

.fxd-broker-article-content ul,
.fxd-broker-article-content ol {
    margin: 0 0 10px;
    padding-left: 20px;
}

/* ═══════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════ */

@media (max-width: 768px) {
    .fxd-broker-identity {
        flex-direction: column;
        align-items: flex-start;
    }

    .fxd-broker-cta-main {
        align-items: flex-start;
        width: 100%;
    }

    .fxd-broker-cta-main .fx-btn {
        width: 100%;
    }

    .fxd-proscons-grid {
        grid-template-columns: 1fr;
    }

    .fxd-proscons-col:first-child {
        border-right: none;
        border-bottom: 1px solid var(--fx-border);
    }

    .fxd-rank-card {
        flex-wrap: wrap;
    }

    .fxd-rank-specs {
        flex-direction: column;
        gap: 2px;
    }

    .fxd-compare-form {
        flex-direction: column;
    }

    .fxd-compare-form select {
        width: 100%;
    }

    .fxd-compare-cta {
        flex-direction: column;
        align-items: stretch;
    }

    .fxd-compare-cta .fx-btn {
        min-width: auto;
    }

    .fxd-score-label {
        width: 120px;
    }

    /* FAQ question rows are the whole tap target — give them a comfortable
       44px touch height on phones. */
    .fxd-faq-q {
        min-height: 44px;
    }
}

@media (max-width: 600px) {
    .fxd-broker-logo {
        width: 56px;
        height: 56px;
    }

    .fxd-broker-name {
        font-size: var(--fx-font-lg);
    }

    .fxd-rank-logo {
        width: 36px;
        height: 36px;
    }

    .fxd-rank-number {
        font-size: var(--fx-font-lg);
        width: 24px;
    }

    .fxd-score-label {
        width: 100px;
        font-size: var(--fx-font-xs);
    }
}
