/*
 * // File: /public/assets/fhdx/css/live-market.css
 *
 * Developed by Noor United Est.
 *
 * Website: www.noor-united.com
 *
 * Kuwait
 * Tel: +965-22280990
 * Mobile: +965-60005677
 *
 * Bahrain
 * Tel: +973-16612020 / +973-16613030
 * Mobile: +973-37616010
 *
 * Copyright (c) Noor United Est.
 * All rights reserved.
 */

/* ==================================================
   Live Control Bar
================================================== */

.fhdx-live-control-section {
    background: #f4f7fb;
    padding: 22px 0;
}

.fhdx-live-control-bar {
    display: grid;
    grid-template-columns: 170px 240px 140px 240px 190px;
    gap: 12px;
    align-items: end;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    padding: 16px;
    box-shadow: 0 14px 34px rgba(15,23,42,.07);
}

.fhdx-control-field label {
    display: block;
    color: #64748b;
    font-size: 12px;
    font-weight: 900;
    margin-bottom: 6px;
}

.fhdx-control-field select,
.fhdx-control-field input {
    width: 100%;
    height: 46px;
    border: 1px solid #dbe3ef;
    border-radius: 12px;
    background: #fff;
    color: #0f172a;
    padding: 0 12px;
    font-size: 14px;
    font-weight: 900;
}

.fhdx-live-control-btn {
    height: 46px;
    border: 0;
    border-radius: 12px;
    background: #0b5cff;
    color: #fff;
    font-size: 14px;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 12px 24px rgba(11,92,255,.22);
}

.fhdx-live-control-btn:hover {
    background: #084ad1;
}

/* ==================================================
   Schools Dropdown
================================================== */

.fhdx-schools-dropdown {
    position: relative;
}

.fhdx-schools-toggle {
    width: 100%;
    height: 46px;
    border: 1px solid #dbe3ef;
    border-radius: 12px;
    background: #fff;
    color: #0f172a;
    padding: 0 12px;
    font-size: 13px;
    font-weight: 900;
    cursor: pointer;
    text-align: start;
}

.fhdx-schools-toggle span {
    display: block;
    color: #64748b;
    font-size: 11px;
    margin-top: 2px;
}

.fhdx-schools-menu {
    position: absolute;
    top: 54px;
    inset-inline-start: 0;
    z-index: 30;
    width: 280px;
    display: none;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    padding: 12px;
    box-shadow: 0 24px 60px rgba(15,23,42,.18);
}

.fhdx-schools-dropdown:hover .fhdx-schools-menu,
.fhdx-schools-dropdown:focus-within .fhdx-schools-menu {
    display: grid;
    gap: 8px;
}

.fhdx-schools-menu label {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 38px;
    color: #0f172a;
    font-size: 13px;
    font-weight: 900;
    cursor: pointer;
}

/* ==================================================
   Live Page Workspace
================================================== */

.fhdx-live-pro-page {
    background: #f4f7fb;
    padding-top: 46px;
    padding-bottom: 58px;
}

.fhdx-live-topbar,
.fhdx-live-decision-row {
    display: grid;
    gap: 14px;
    margin-bottom: 18px;
}

.fhdx-live-topbar {
    grid-template-columns: repeat(5,1fr);
}

.fhdx-live-decision-row {
    grid-template-columns: 1.4fr repeat(5,1fr);
}

.fhdx-live-top-card,
.fhdx-live-decision-card,
.fhdx-live-mini-card,
.fhdx-panel-card,
.fhdx-live-stat,
.fhdx-ai-chart-card,
.fhdx-info-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    box-shadow: 0 14px 34px rgba(15,23,42,.07);
}

.fhdx-live-top-card,
.fhdx-live-decision-card,
.fhdx-live-mini-card {
    padding: 18px;
}

.fhdx-live-top-card {
    min-height: 118px;
}

.fhdx-live-top-card span,
.fhdx-live-decision-card span,
.fhdx-live-mini-card span,
.fhdx-live-stat span {
    display: block;
    color: #64748b;
    font-size: 13px;
    font-weight: 800;
    margin-bottom: 8px;
}

.fhdx-live-top-card strong,
.fhdx-live-mini-card strong,
.fhdx-live-stat strong {
    display: block;
    color: #111827;
    font-size: 22px;
    font-weight: 900;
    line-height: 1.2;
}

.fhdx-live-top-card small,
.fhdx-live-decision-card small {
    display: block;
    color: #64748b;
    font-size: 13px;
    font-weight: 800;
    margin-top: 6px;
}

.fhdx-live-decision-card strong {
    display: block;
    font-size: 34px;
    font-weight: 900;
    line-height: 1;
}

.fhdx-live-decision-card.buy strong,
.fhdx-live-decision-top.buy strong {
    color: #16a34a;
}

.fhdx-live-decision-card.sell strong,
.fhdx-live-decision-top.sell strong {
    color: #dc2626;
}

.fhdx-live-decision-card.wait strong,
.fhdx-live-decision-top.wait strong {
    color: #f59e0b;
}

.fhdx-live-workspace {
    display: grid;
    grid-template-columns: 320px minmax(680px,1fr) 300px;
    gap: 22px;
    align-items: start;
}

.fhdx-live-left-panel,
.fhdx-live-right-panel {
    display: grid;
    gap: 18px;
}

.fhdx-live-chart-area,
.fhdx-live-main {
    min-width: 0;
}

.fhdx-panel-card {
    padding: 18px;
}

.fhdx-panel-card h3 {
    color: #111827;
    font-size: 17px;
    font-weight: 900;
    margin: 0 0 14px;
}

.fhdx-panel-card p,
.fhdx-panel-note {
    color: #475569;
    font-size: 14px;
    line-height: 1.8;
    margin: 0;
}

.fhdx-panel-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #eef2f7;
}

.fhdx-panel-row:last-child {
    border-bottom: 0;
}

.fhdx-panel-row span {
    color: #64748b;
    font-size: 13px;
    font-weight: 800;
}

.fhdx-panel-row strong {
    color: #111827;
    font-size: 14px;
    font-weight: 900;
    text-align: end;
}

/* ==================================================
   Live Layout / Chart
================================================== */

.fhdx-live-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 18px;
    align-items: stretch;
}

#fhdx-live-market-chart {
    width: 100%;
    height: 560px;
    min-height: 430px;
    background: #050505;
}

.fhdx-ai-chart-card {
    overflow: hidden;
}

.fhdx-ai-chart-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;
}

.fhdx-ai-chart-head h2 {
    margin: 4px 0 0;
    font-size: 20px;
    font-weight: 900;
    color: #111827;
}

.fhdx-ai-chart-badge {
    background: #0b5cff;
    color: #fff;
    padding: 10px 18px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 900;
    white-space: nowrap;
}

.fhdx-ai-chart-badge.buy {
    background: #16a34a;
}

.fhdx-ai-chart-badge.sell {
    background: #dc2626;
}

.fhdx-ai-chart-badge.wait {
    background: #f59e0b;
}

#fhdx-ai-chart {
    width: 100%;
    height: 500px;
    background: #050505;
}

.fhdx-chart-meta-strip {
    display: grid;
    grid-template-columns: repeat(2,1fr);
    gap: 10px;
    padding: 10px 14px;
    border-top: 1px solid #edf2f7;
    border-bottom: 1px solid #edf2f7;
    background: #fbfdff;
}

.fhdx-chart-meta-strip div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-width: 0;
    padding: 8px 10px;
    border: 1px solid #e5eaf2;
    border-radius: 12px;
    background: #fff;
}

.fhdx-chart-meta-strip span {
    color: #64748b;
    font-size: 11px;
    font-weight: 800;
}

.fhdx-chart-meta-strip strong {
    color: #0f172a;
    font-size: 12px;
    font-weight: 900;
    white-space: nowrap;
}

.fhdx-chart-mtf-card {
    margin-top: 18px;
}

/* ==================================================
   AI Rows / Stats
================================================== */

.fhdx-live-ai-row {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 14px;
    margin-top: 18px;
}

.fhdx-live-side {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    align-content: start;
}

.fhdx-live-stat {
    padding: 18px;
}

.fhdx-live-disclaimer {
    margin-top: 18px;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    color: #9a3412;
    border-radius: 18px;
    padding: 16px;
    text-align: center;
    font-size: 14px;
    font-weight: 900;
}

.fhdx-info-card {
    padding: 16px;
    min-height: auto;
    text-align: start;
}

.fhdx-info-card h3 {
    text-align: start;
    color: #111827;
    font-size: 18px;
    margin: 0 0 10px;
}

.fhdx-info-card p {
    color: #475569;
    font-size: 14px;
    line-height: 1.9;
    margin: 0;
}

/* ==================================================
   Agreement / Schools
================================================== */

.fhdx-agreement-score {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 14px;
    margin-bottom: 12px;
    border-radius: 14px;
    background: #f8fafc;
    border: 1px solid #e5eaf2;
}

.fhdx-agreement-score strong {
    font-size: 20px;
    font-weight: 900;
}

.fhdx-agreement-score span {
    font-size: 18px;
    font-weight: 900;
}

.fhdx-agreement-score.buy strong,
.fhdx-agreement-score.buy span {
    color: #16a34a;
}

.fhdx-agreement-score.sell strong,
.fhdx-agreement-score.sell span {
    color: #dc2626;
}

.fhdx-agreement-score.wait strong,
.fhdx-agreement-score.wait span {
    color: #f59e0b;
}

.fhdx-school-table {
    display: grid;
    gap: 10px;
}

.fhdx-school-details {
    border: 1px solid rgba(15,23,42,.08);
    border-radius: 14px;
    padding: 12px;
    background: #fff;
}

.fhdx-school-header {
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.fhdx-school-header span {
    font-weight: 800;
    color: #0f172a;
    font-size: 13px;
}

.fhdx-school-header em {
    font-style: normal;
    font-weight: 800;
    font-size: 12px;
    color: #64748b;
}

.fhdx-school-reason {
    margin: 0;
    padding-top: 8px;
    border-top: 1px dashed rgba(15,23,42,.12);
    color: #475569;
    font-size: 12px;
    line-height: 1.8;
}

.fhdx-school-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 54px;
    padding: 4px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 900;
    color: #fff;
}

.fhdx-school-pill.buy {
    background: #16a34a;
}

.fhdx-school-pill.sell {
    background: #dc2626;
}

.fhdx-school-pill.wait {
    background: #f59e0b;
}

html[dir="rtl"] .fhdx-school-reason {
    text-align: right;
}

/* ==================================================
   Multi Timeframe
================================================== */

.fhdx-mtf-grid {
    display: grid;
    grid-template-columns: repeat(5,1fr);
    gap: 10px;
    margin-top: 14px;
    direction: ltr;
}

.fhdx-live-right-panel .fhdx-mtf-grid {
    grid-template-columns: 1fr 1fr;
}

.fhdx-chart-mtf-card .fhdx-mtf-grid {
    grid-template-columns: repeat(5,minmax(0,1fr));
}

.fhdx-mtf-item {
    min-height: 78px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 14px 12px;
    text-align: center;
}

.fhdx-live-right-panel .fhdx-mtf-item {
    padding: 10px;
}

.fhdx-mtf-item strong {
    display: block;
    color: #111827;
    font-size: 16px;
    font-weight: 900;
    margin-bottom: 6px;
}

.fhdx-mtf-item span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 64px;
    padding: 6px 10px;
    border-radius: 999px;
    color: #fff;
    font-size: 12px;
    font-weight: 900;
    margin-bottom: 6px;
}

.fhdx-mtf-item small {
    display: block;
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
}

.fhdx-mtf-item.buy span {
    background: #16a34a;
}

.fhdx-mtf-item.sell span {
    background: #dc2626;
}

.fhdx-mtf-item.wait span {
    background: #f59e0b;
}

/* ==================================================
   Responsive
================================================== */

@media (max-width: 1200px) {
    .fhdx-live-workspace,
    .fhdx-live-layout {
        grid-template-columns: 1fr;
    }

    .fhdx-live-left-panel,
    .fhdx-live-right-panel {
        grid-template-columns: repeat(2,1fr);
    }

    .fhdx-live-chart-area {
        order: -1;
    }

    .fhdx-live-topbar,
    .fhdx-live-decision-row {
        grid-template-columns: repeat(2,minmax(0,1fr));
    }

    .fhdx-live-decision-card {
        grid-column: 1 / -1;
    }

    .fhdx-chart-mtf-card .fhdx-mtf-grid {
        grid-template-columns: repeat(2,minmax(0,1fr));
    }
}

@media (max-width: 991px) {
    .fhdx-live-control-bar {
        grid-template-columns: 1fr 1fr;
    }

    .fhdx-schools-dropdown,
    .fhdx-live-control-btn {
        grid-column: 1 / -1;
    }

    .fhdx-live-ai-row {
        grid-template-columns: 1fr;
    }

    .fhdx-live-side {
        grid-template-columns: repeat(2,1fr);
    }
}

@media (max-width: 768px) {
    .fhdx-live-pro-page {
        padding-top: 28px;
    }

    .fhdx-live-topbar,
    .fhdx-live-decision-row {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .fhdx-live-top-card,
    .fhdx-live-mini-card {
        min-height: 92px;
        padding: 14px;
    }

    .fhdx-live-top-card strong,
    .fhdx-live-mini-card strong,
    .fhdx-live-stat strong {
        font-size: 17px;
        word-break: break-word;
    }

    .fhdx-live-decision-card {
        grid-column: 1 / -1;
        padding: 18px;
        text-align: center;
    }

    .fhdx-live-decision-card strong {
        font-size: 42px;
    }

    .fhdx-live-left-panel,
    .fhdx-live-right-panel,
    .fhdx-live-side {
        grid-template-columns: 1fr;
    }

    .fhdx-panel-card {
        padding: 16px;
        border-radius: 18px;
    }

    .fhdx-panel-row span,
    .fhdx-panel-row strong {
        font-size: 13px;
    }

    .fhdx-chart-meta-strip {
        grid-template-columns: 1fr;
    }

    #fhdx-live-market-chart {
        height: 390px;
        min-height: 390px;
    }

    #fhdx-ai-chart {
        height: 380px;
    }

    .fhdx-ai-chart-head {
        flex-direction: column;
        align-items: flex-start;
        padding: 16px;
    }

    .fhdx-ai-chart-head h2 {
        font-size: 18px;
    }

    .fhdx-live-right-panel .fhdx-mtf-grid,
    .fhdx-mtf-grid {
        grid-template-columns: 1fr 1fr;
    }

    .fhdx-info-card {
        padding: 18px;
    }
}

@media (max-width: 600px) {
    .fhdx-live-control-section {
        padding: 16px 0;
    }

    .fhdx-live-control-bar {
        grid-template-columns: 1fr;
        padding: 14px;
        border-radius: 18px;
    }

    .fhdx-schools-menu {
        position: static;
        width: 100%;
        margin-top: 10px;
        box-shadow: none;
    }
}

@media (max-width: 640px) {
    .fhdx-live-topbar {
        grid-template-columns: 1fr;
    }
}