/*
 * // File: /public/assets/fhdx/css/analysis.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.
 */

/* ==================================================
   Analysis Create Page
================================================== */

.fhdx-page-hero {
    padding: 70px 0 35px;
    background: #050505;
    color: #fff;
}

.fhdx-page-hero-inner {
    max-width: 760px;
}

.fhdx-page-hero h1 {
    margin: 10px 0 14px;
    font-size: 42px;
}

.fhdx-page-hero p {
    max-width: 680px;
    color: #b8b8b8;
    line-height: 1.8;
}

.fhdx-analysis-layout {
    display: grid;
    grid-template-columns: 1.4fr .7fr;
    gap: 28px;
    align-items: start;
}

.fhdx-analysis-card,
.fhdx-side-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 22px;
    padding: 28px;
    box-shadow: 0 14px 35px rgba(0,0,0,.06);
}

.fhdx-card-head {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    align-items: flex-start;
    margin-bottom: 24px;
}

.fhdx-card-kicker,
.fhdx-eyebrow {
    display: inline-block;
    color: #2563eb;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.fhdx-status-pill {
    background: #eef4ff;
    color: #2563eb;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.fhdx-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.fhdx-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.fhdx-field label,
.fhdx-form-group label {
    display: block;
    margin-bottom: 8px;
    color: #111827;
    font-size: 13px;
    font-weight: 900;
}

.fhdx-field input,
.fhdx-field select,
.fhdx-form-group input,
.fhdx-form-group select {
    width: 100%;
    height: 50px;
    border: 1px solid #d9dee7;
    border-radius: 14px;
    padding: 0 14px;
    background: #fff;
    color: #0f172a;
    font-size: 15px;
    font-weight: 800;
}

.fhdx-market-cards {
    display: grid;
    grid-template-columns: repeat(5,1fr);
    gap: 8px;
    margin-bottom: 18px;
}

.fhdx-market-card {
    border: 1px solid #e5eaf2;
    background: #fff;
    border-radius: 16px;
    padding: 12px 10px;
    cursor: pointer;
    text-align: center;
    font-size: 12px;
    font-weight: 900;
    transition: .18s ease;
}

.fhdx-market-card.active {
    background: #0b5cff;
    color: #fff;
    border-color: #0b5cff;
    box-shadow: 0 12px 24px rgba(11,92,255,.24);
}

.fhdx-upload-box {
    min-height: 230px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg,#f8fbff,#fff);
    border-radius: 24px;
}

.fhdx-upload-box input {
    display: none;
}

.fhdx-upload-box label {
    width: 100%;
    min-height: 170px;
    padding: 34px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 2px dashed #cbd5e1;
    border-radius: 22px;
    background: #f8fafc;
    cursor: pointer;
    text-align: center;
    transition: .25s ease;
}

.fhdx-upload-box label:hover {
    border-color: #2563eb;
    background: #eef4ff;
}

.fhdx-upload-icon {
    width: 58px;
    height: 58px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    border-radius: 50%;
    background: #050505;
    color: #fff;
    font-size: 28px;
}

.fhdx-upload-box strong {
    color: #111827;
    font-size: 17px;
}

.fhdx-upload-box small {
    color: #6b7280;
    margin-top: 6px;
}

.fhdx-school-grid {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 12px;
    margin-top: 10px;
}

.fhdx-school {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 54px;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    padding: 14px;
    background: #fff;
    cursor: pointer;
    font-weight: 900;
}

.fhdx-school input {
    width: auto;
    margin-right: 8px;
}

[dir="rtl"] .fhdx-school input {
    margin-right: 0;
    margin-left: 8px;
}

.fhdx-pro-engine {
    display: grid;
    grid-template-columns: repeat(4,1fr);
    gap: 8px;
    margin: 18px 0;
}

.fhdx-pro-engine div {
    background: #f8fafc;
    border: 1px solid #e5eaf2;
    border-radius: 14px;
    padding: 11px;
    color: #0f172a;
    text-align: center;
    font-size: 12px;
    font-weight: 900;
}

.fhdx-pro-summary-line {
    margin: 18px 0;
    background: #0f172a;
    color: #fff;
    border-radius: 18px;
    padding: 16px;
    text-align: center;
    font-weight: 900;
    letter-spacing: .2px;
}

.fhdx-warning-note {
    background: #fff7ed;
    color: #9a3412;
    border: 1px solid #fed7aa;
    border-radius: 14px;
    padding: 14px;
    line-height: 1.7;
    font-weight: 600;
}

.fhdx-analysis-side {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.fhdx-side-card h3 {
    margin: 0 0 14px;
}

.fhdx-side-card ul {
    padding: 0;
    margin: 0;
    list-style: none;
}

.fhdx-side-card li {
    padding: 10px 0;
    border-bottom: 1px solid #edf0f4;
    color: #374151;
}

.fhdx-side-card li:last-child {
    border-bottom: 0;
}

.fhdx-side-dark {
    background: #050505;
    color: #fff;
    border-color: #050505;
}

.fhdx-side-dark p {
    color: #c9c9c9;
    line-height: 1.8;
}

/* ==================================================
   Loading Popup
================================================== */

.fhdx-pro-loading {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 22px;
    background: rgba(3,7,18,.72);
    backdrop-filter: blur(10px);
}

.fhdx-pro-loading-card {
    width: min(430px,94vw);
    padding: 34px 26px;
    border-radius: 28px;
    background: linear-gradient(180deg,#0f172a,#020617);
    border: 1px solid rgba(255,255,255,.12);
    box-shadow: 0 30px 90px rgba(0,0,0,.5);
    text-align: center;
}

.fhdx-loading-percent {
    color: #fff;
    font-size: 50px;
    font-weight: 900;
    line-height: 1;
    margin-bottom: 20px;
}

.fhdx-loading-bar {
    width: 100%;
    height: 13px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255,255,255,.12);
    margin-bottom: 22px;
}

.fhdx-loading-bar span {
    display: block;
    width: 0%;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg,#2563eb,#38bdf8,#22c55e);
    transition: width .35s ease;
}

.fhdx-pro-loading-card h2 {
    color: #fff;
    font-size: 24px;
    font-weight: 900;
    margin: 0 0 8px;
}

.fhdx-pro-loading-card p {
    color: #dbeafe;
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 14px;
}

.fhdx-pro-loading-card small {
    display: block;
    color: #94a3b8;
    font-size: 13px;
    line-height: 1.7;
}

/* ==================================================
   Upload Image Popup
================================================== */

.fhdx-upload-popup {
    position: fixed;
    inset: 0;
    z-index: 9999999;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(2,6,23,.72);
    backdrop-filter: blur(8px);
    padding: 18px;
}

.fhdx-upload-popup.show {
    display: flex;
}

.fhdx-upload-popup-card {
    position: relative;
    width: min(420px,94vw);
    background: #fff;
    border-radius: 26px;
    padding: 30px 24px 24px;
    text-align: center;
    box-shadow: 0 35px 100px rgba(0,0,0,.35);
    animation: fhdxPopupIn .22s ease-out;
}

.fhdx-upload-popup-close {
    position: absolute;
    top: 12px;
    inset-inline-end: 14px;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: #f1f5f9;
    color: #0f172a;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

.fhdx-upload-popup-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 22px;
    background: #fff7ed;
    font-size: 34px;
}

.fhdx-upload-popup-card h3 {
    margin: 0 0 8px;
    color: #0f172a;
    font-size: 22px;
    font-weight: 900;
}

.fhdx-upload-popup-card p {
    margin: 0 0 20px;
    color: #64748b;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.8;
}

.fhdx-upload-popup-btn {
    width: 100%;
    border: 0;
    border-radius: 16px;
    background: #0b5cff;
    color: #fff;
    padding: 14px 16px;
    font-size: 14px;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 14px 28px rgba(11,92,255,.28);
}

.fhdx-upload-popup-btn:hover {
    background: #084ad1;
}

/* ==================================================
   Analysis Result Page
================================================== */

.fhdx-report-dark {
    background: #f4f7fb;
    color: #111827;
    padding: 28px 0;
}

.fhdx-report-dark .fhdx-container {
    max-width: 1100px;
}

.fhdx-report-grid {
    display: block;
    margin-bottom: 14px;
}

.fhdx-report-card,
.fhdx-summary-card,
.fhdx-info-card {
    background: #fff;
    color: #111827;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    box-shadow: 0 14px 34px rgba(15,23,42,.07);
}

.fhdx-chart-card {
    padding: 14px;
    min-height: auto;
    margin: 0 auto 14px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.fhdx-chart-card img {
    display: block;
    width: auto;
    max-width: 100%;
    max-height: 360px;
    object-fit: contain;
    margin: 0 auto;
    border-radius: 14px;
    background: #fff;
    cursor: zoom-in;
}

.fhdx-direction {
    padding: 22px;
    text-align: center;
    display: flex;
    flex-direction: column;
    margin-bottom: 14px;
}

.fhdx-direction-title {
    color: #64748b;
    font-size: 14px;
    margin-bottom: 8px;
}

.fhdx-direction-value {
    font-size: 30px;
    line-height: 1;
    font-weight: 900;
    margin: 0 0 12px;
}

.fhdx-direction-value.neutral {
    color: #f59e0b;
}

.fhdx-direction-value.bullish {
    color: #16a34a;
}

.fhdx-direction-value.bearish {
    color: #dc2626;
}

.fhdx-signal-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    padding: 8px 18px;
    border-radius: 999px;
    font-size: 15px;
    line-height: 1;
    font-weight: 900;
    color: #fff;
    letter-spacing: .6px;
}

.fhdx-signal-badge.buy {
    background: #16a34a;
    box-shadow: 0 12px 28px rgba(22,163,74,.22);
}

.fhdx-signal-badge.sell {
    background: #dc2626;
    box-shadow: 0 12px 28px rgba(220,38,38,.22);
}

.fhdx-signal-badge.wait {
    background: #f59e0b;
    box-shadow: 0 12px 28px rgba(245,158,11,.22);
}

.fhdx-confidence-circle {
    width: 140px;
    height: 140px;
    min-width: 140px;
    min-height: 140px;
    margin: 0 auto 14px;
    border: 11px solid #16a34a;
    border-radius: 50%;
    background: #fff;
    color: #111827;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 34px;
    font-weight: 900;
}

.fhdx-meta-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 12px;
}

.fhdx-meta-row span,
.fhdx-risk,
.fhdx-school-status {
    background: #eef2f7;
    color: #334155;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    font-size: 13px;
    padding: 6px 10px;
}

.fhdx-risk {
    display: inline-block;
    margin: 0 auto 14px;
}

.fhdx-levels-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 14px;
}

.fhdx-level-box {
    min-height: 82px;
    height: auto;
    padding: 10px 12px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    text-align: right;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.fhdx-level-box:last-child {
    grid-column: 1 / -1;
}

.fhdx-level-box span {
    color: #64748b;
    font-size: 12px;
    margin-bottom: 4px;
}

.fhdx-level-box strong {
    color: #111827;
    font-size: 13px;
    line-height: 1.5;
    font-weight: 800;
}

.fhdx-summary-card {
    padding: 20px;
    margin-bottom: 0;
    color: #334155;
    text-align: right;
    font-size: 15px;
    line-height: 1.85;
}

.fhdx-scenario-grid {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 14px;
    align-items: stretch;
}

.fhdx-school-grid-report {
    display: grid;
    grid-template-columns: repeat(2,1fr);
    gap: 14px;
    align-items: stretch;
}

.fhdx-info-card {
    padding: 16px;
    min-height: 132px;
    height: auto;
    text-align: right;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    overflow: visible;
}

.fhdx-info-card h3 {
    margin: 0 0 8px;
    color: #111827;
    font-size: 17px;
    line-height: 1.3;
    font-weight: 900;
}

.fhdx-info-card p {
    margin: 0;
    color: #475569;
    font-size: 13.5px;
    line-height: 1.7;
}

.fhdx-warning-card {
    background: #fff7ed;
    border-color: #fed7aa;
}

.fhdx-school-score {
    color: #16a34a;
    font-size: 24px;
    line-height: 1;
    font-weight: 900;
    margin-bottom: 8px;
}

.fhdx-school-status {
    width: max-content;
    margin-bottom: 8px;
}

.fhdx-accordion {
    margin-top: 10px;
}

.fhdx-accordion-item {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    box-shadow: 0 12px 28px rgba(15,23,42,.06);
    margin-bottom: 10px;
    overflow: hidden;
}

.fhdx-accordion-head {
    width: 100%;
    border: 0;
    background: #fff;
    color: #111827;
    padding: 15px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    font-size: 17px;
    font-weight: 900;
    text-align: right;
}

.fhdx-accordion-head span {
    color: #0b5cff;
    font-size: 22px;
    font-weight: 900;
    line-height: 1;
}

.fhdx-accordion-body {
    display: none;
    padding: 0 14px 14px;
}

.fhdx-accordion-item.open .fhdx-accordion-body {
    display: block;
}

.fhdx-report-action {
    margin-top: 14px;
}

/* ==================================================
   Animation
================================================== */

@keyframes fhdxPopupIn {
    from {
        opacity: 0;
        transform: translateY(12px) scale(.96);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ==================================================
   Responsive
================================================== */

@media (max-width: 991px) {
    .fhdx-analysis-layout,
    .fhdx-form-grid,
    .fhdx-school-grid,
    .fhdx-report-grid,
    .fhdx-scenario-grid,
    .fhdx-school-grid-report {
        grid-template-columns: 1fr;
    }

    .fhdx-page-hero h1 {
        font-size: 32px;
    }

    .fhdx-report-dark .fhdx-container {
        max-width: 94%;
    }

    .fhdx-chart-card {
        max-width: 100%;
    }

    .fhdx-chart-card img {
        max-height: 330px;
    }

    .fhdx-info-card {
        height: auto;
        min-height: 132px;
    }
}

@media (max-width: 768px) {
    .fhdx-analysis-card {
        padding: 24px 18px !important;
        border-radius: 24px !important;
    }

    .fhdx-card-head {
        text-align: start;
        margin-bottom: 22px;
    }

    .fhdx-card-head h2 {
        font-size: 24px;
        margin: 8px 0;
    }

    .fhdx-card-head p {
        color: #475569;
        font-size: 14px;
        line-height: 1.8;
    }

    .fhdx-market-cards,
    .fhdx-pro-engine {
        grid-template-columns: 1fr 1fr;
    }

    .fhdx-school-grid {
        gap: 12px;
        margin-top: 18px;
    }

    .fhdx-school {
        min-height: 58px;
        padding: 14px 18px;
        box-shadow: 0 8px 18px rgba(15,23,42,.04);
    }

    .fhdx-pro-summary-line {
        margin: 22px 0 18px;
        padding: 18px 16px;
        font-size: 14px;
        line-height: 1.6;
    }

    .fhdx-btn,
    .fhdx-btn-primary {
        width: 100%;
        height: 56px;
        border-radius: 16px;
        font-size: 15px;
        font-weight: 900;
    }

    .fhdx-levels-grid {
        grid-template-columns: 1fr;
    }

    .fhdx-level-box:last-child {
        grid-column: auto;
    }

    .fhdx-chart-card img {
        max-height: 300px;
    }
}

@media (max-width: 600px) {
    .fhdx-pro-loading-card {
        padding: 28px 20px;
        border-radius: 24px;
    }

    .fhdx-loading-percent {
        font-size: 42px;
    }

    .fhdx-pro-loading-card h2 {
        font-size: 21px;
    }
}