/* ===== FONT ONLY FOR THIS PAGE ===== */
.signals-setup,
.signals-setup * {
    font-family: "Lexend", sans-serif !important;
    letter-spacing: 0.5px;
}

/* ========== PAGE STRUCTURE ========== */
.signals-setup {
    width: 100%;
    padding-top: 60px;
    padding-bottom: 120px;
    display: flex;
    justify-content: center;
    padding-left: 16px;
    padding-right: 16px;

    position: relative;
    overflow: hidden;
}

.signals-shell {
    width: 100%;
    max-width: 1000px;
    display: flex;
    flex-direction: column;
    align-items: center;

    position: relative;
    z-index: 1;
}

/* ========== HEADER ========== */
.signals-header {
    text-align: center;
    margin-bottom: 28px;
}

/* 🟢 М’яке світіння + легкий градієнт */
.signals-title {
    margin: 0 0 18px;
    font-size: 56px;
    font-weight: 800;
    letter-spacing: 0.5px;

    background: linear-gradient(90deg, #ffffff, #dffaff, #e4d6ff);
    -webkit-background-clip: text;
    color: transparent;

    filter: drop-shadow(0 0 12px rgba(0, 255, 255, 0.12));
}

/* ===== PASSRATE ===== */
.signals-passrate {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;

    padding: 8px 18px;
    border-radius: 999px;

    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(148, 163, 184, 0.22);

    font-size: 15px;
}

.passrate-label {
    opacity: 0.55;
}

.passrate-value {
    font-weight: 800;
    font-size: 18px;
    color: #fff;
}

.passrate-unit {
    font-weight: 700;
    color: #fff;
}

/* ========== INFO BUTTON ========== */
.info-top-wrapper {
    margin-top: 12px;
    margin-bottom: 22px;
}

.pill-info {
    padding: 8px 16px;
    border-radius: 999px;
    background: rgba(15,23,42,0.9);
    border: 1px solid rgba(148,163,184,0.6);
    color: #e5e7eb;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    backdrop-filter: blur(10px);
    transition: 0.18s ease;
}

.pill-info:hover {
    border-color: rgba(56,189,248,0.9);
    box-shadow: 0 0 0 1px rgba(56,189,248,0.4);
}

/* ========== CHIP ROWS ========== */
.signals-row {
    position: relative;
    margin-top: 16px;
    width: 100%;
    text-align: center;
}

.chip-row {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.chip {
    padding: 10px 22px;
    border-radius: 999px;
    background: rgba(15,23,42,0.85);
    border: 1px solid rgba(148,163,184,0.55);
    font-size: 15px;
    cursor: pointer;

    transition: 0.16s ease;
    color: #e5e7eb;
    backdrop-filter: blur(12px);
}

/* 🟢 НЕАКТИВНІ КНОПКИ — НАПІВПРОЗОРІ */
.chip:not(.chip--active) {
    opacity: 0.45;
}
.chip:not(.chip--active):hover {
    opacity: 0.75;
}

/* Hover */
.chip:hover {
    border-color: rgba(56,189,248,0.8);
    box-shadow: 0 0 0 1px rgba(56,189,248,0.4);
}

/* ACTIVE chip */
.chip--active {
    opacity: 1 !important;
    background: linear-gradient(135deg, #00d9ff, #0072ff);
    border-color: rgba(226, 232, 240, 0.9);
    color: #fff;
    box-shadow: 0 10px 30px rgba(0,153,255,0.35);
    transform: translateY(-1px);
}

/* Заблокований вибір ринку (недоступний по балансу) */
.chip--disabled {
    opacity: 0.35;
    cursor: default;
    pointer-events: none;
    box-shadow: none;
}

/* Ховаємо ряд Currency Pair для ULTRA */
.signals-row--hidden {
    display: none;
}

/* Баланс під кнопкою */
.balance-indicator {
    margin-top: 8px;
    font-size: 13px;
    opacity: 0.8;
    text-align: center;
}

/* Повідомлення про ринки / кулдауни */
.setup-message {
    margin-top: 6px;
    font-size: 13px;
    text-align: center;
    opacity: 0.85;
    color: #a5b4fc;
}


/* ================= AI ICONS (PNG) ================= */
.ai-icon {
    width: 20px;
    height: 20px;
    margin-right: 8px;
    object-fit: contain;
    filter: drop-shadow(0 0 6px rgba(0,255,255,0.45));
}

/* Market active */
.chip[data-market="demo"].chip--active {
    background: linear-gradient(135deg, #22c55e, #16a34a);
}
.chip[data-market="market"].chip--active {
    background: linear-gradient(135deg, #0ea5e9, #2563eb);
}
.chip[data-market="ultra"].chip--active {
    background: linear-gradient(135deg, #ec4899, #8b5cf6);
}


/* ---- AI icons inside buttons ---- */
.chip--ai {
    display: inline-flex;
    align-items: center;
    gap: 8px;                 /* відстань між іконкою і текстом */
    padding-left: 18px;       /* щоб іконка не липла до краю */
    padding-right: 22px;
}

/* PNG іконки */
.ai-icon {
    width: 22px;              /* 🔥 більше і чіткіше */
    height: 22px;
    object-fit: contain;
    opacity: 0.9;
    filter: drop-shadow(0 0 4px rgba(0,255,255,0.35));
    transform: translateY(-1px); /* трішки підняти щоб виглядало ідеально */
}

/* Активна кнопка — іконка яскравіша */
.chip--ai.chip--active .ai-icon {
    opacity: 1;
    filter: drop-shadow(0 0 6px rgba(0,255,255,0.55));
}

/* TIME */
.chip--time.chip--active {
    background: linear-gradient(135deg, #34d399, #22c55e);
}

/* LABEL */
.row-label {
    margin-bottom: 8px;
    font-size: 14px;
    opacity: 0.7;
}

/* ========== BADGES (NEW FULL STYLING) ========== */
.pair-type-badge {
    min-width: 72px;
    padding: 4px 14px;
    border-radius: 999px;

    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    text-align: center;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border-width: 1px;
    border-style: solid;

    opacity: 1 !important;
}

/* MAJOR */
.pair-type-badge--major {
    background: radial-gradient(circle at 30% 0%,
        rgba(34, 197, 94, 0.28),
        rgba(5, 46, 22, 0.95)
    );
    border-color: rgba(74, 222, 128, 0.85);
    color: #d1fae5;
    box-shadow:
      0 0 0 1px rgba(22, 163, 74, 0.4),
      0 0 16px rgba(22, 163, 74, 0.45);
}

/* CROSS */
.pair-type-badge--cross {
    background: radial-gradient(circle at 30% 0%,
        rgba(59, 130, 246, 0.28),
        rgba(15, 23, 42, 0.96)
    );
    border-color: rgba(96, 165, 250, 0.85);
    color: #dbeafe;
    box-shadow:
      0 0 0 1px rgba(59, 130, 246, 0.45),
      0 0 16px rgba(37, 99, 235, 0.5);
}

/* ========== FLAGS ========== */
.flag {
    display: inline-block;
    width: 22px;
    height: 22px;
    background-size: cover;
    background-position: center;
    border-radius: 999px;
    box-shadow: 0 0 4px rgba(0,0,0,0.6);
    border: 1px solid rgba(15,23,42,0.9);
}

.flag[data-cc="aud"] { background-image: url("/static/flags/aud.svg"); }
.flag[data-cc="cad"] { background-image: url("/static/flags/cad.svg"); }
.flag[data-cc="chf"] { background-image: url("/static/flags/chf.svg"); }
.flag[data-cc="eur"] { background-image: url("/static/flags/eur.svg"); }
.flag[data-cc="gbp"] { background-image: url("/static/flags/gbp.svg"); }
.flag[data-cc="jpy"] { background-image: url("/static/flags/jpy.svg"); }
.flag[data-cc="usd"] { background-image: url("/static/flags/usd.svg"); }

.pair-flags {
    display: flex;
    align-items: center;
}

.flag-left {
    position: relative;
    z-index: 2;
    margin-right: -6px;
}

.flag-right {
    position: relative;
    z-index: 1;
}


/* ========= INFO MODAL ========= */

.setup-modal-backdrop {
    position: fixed;           /* завжди відносно екрану */
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;

    z-index: 999;

    display: flex;
    align-items: flex-start;       /* по центру вертикалі */
    justify-content: center;   /* по центру горизонту */

    background:
        radial-gradient(circle at top, rgba(56, 189, 248, 0.12), transparent 55%),
        radial-gradient(circle at bottom, rgba(129, 140, 248, 0.14), transparent 55%),
        rgba(3, 7, 18, 0.88);

    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease;
    padding: 16px;
}

.setup-modal-backdrop.open {
    opacity: 1;
    pointer-events: auto;
}

.setup-modal {
    width: 100%;
    max-width: 480px;
    border-radius: 24px;
    padding: 22px 22px 18px;

    background:
        radial-gradient(circle at 0% 0%, rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.96)),
        linear-gradient(135deg, rgba(15,23,42,0.96), rgba(15,23,42,0.98));
    border: 1px solid rgba(148, 163, 184, 0.55);
    box-shadow:
      0 22px 60px rgba(15, 23, 42, 0.95),
      0 0 0 1px rgba(94, 234, 212, 0.25);

    position: relative;
    color: #e5e7eb;

    transform: translateY(10px) scale(0.97);
    opacity: 0;
    transition: transform 0.22s ease, opacity 0.22s ease;
    backdrop-filter: blur(18px);
}

.setup-modal-backdrop.open .setup-modal {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.setup-modal-close {
    position: absolute;
    top: 10px;
    right: 10px;

    width: 28px;
    height: 28px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.6);
    background: radial-gradient(circle at 30% 0%, rgba(15, 23, 42, 1), rgba(15, 23, 42, 0.96));
    color: #9ca3af;
    font-size: 16px;
    cursor: pointer;

    display: flex;
    align-items: center;
    justify-content: center;

    transition: 0.18s ease;
}

.setup-modal-close:hover {
    color: #e5e7eb;
    border-color: rgba(94, 234, 212, 0.7);
    box-shadow: 0 0 0 1px rgba(94, 234, 212, 0.5);
}

/* header всередині модалки */

.setup-modal-header {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 10px;
}

.setup-modal-pill {
    align-self: flex-start;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;

    background: radial-gradient(circle at 30% 0%, rgba(34, 211, 238, 0.22), rgba(15, 23, 42, 1));
    border: 1px solid rgba(45, 212, 191, 0.7);
    color: #a5f3fc;
}

.setup-modal-title {
    font-size: 20px;
    font-weight: 700;
    color: #e5e7eb;
}

.setup-modal-body {
    font-size: 14px;
    line-height: 1.6;
    color: #cbd5f5;
    margin-bottom: 10px;
}

.setup-modal-body p + p {
    margin-top: 8px;
}

.setup-modal-body b {
    color: #e5e7eb;
}

.setup-modal-footer {
    margin-top: 4px;
}

.setup-modal-hint {
    font-size: 12px;
    color: #9ca3af;
    border-top: 1px dashed rgba(148, 163, 184, 0.5);
    padding-top: 8px;
}

/* коли модалка відкрита — блокуємо скрол фону */
body.modal-open {
    overflow: hidden;
    position: fixed;
    inset: 0;
    width: 100%;
}

/* ========= BALANCE + MESSAGE TEXT ========= */

.balance-indicator {
    margin-top: 10px;
    font-size: 13px;
    color: #e5e7eb;
    text-align: center;
    opacity: 0.9;
}

.setup-message {
    margin-top: 8px;
    font-size: 13px;
    color: #f97373;
    text-align: center;
    line-height: 1.5;
}


/* ========= BALANCE + MESSAGE TEXT ========= */

.balance-indicator {
    margin-top: 10px;
    font-size: 13px;
    color: #e5e7eb;
    text-align: center;
    opacity: 0.9;
}

.setup-message {
    margin-top: 8px;
    font-size: 13px;
    color: #f97373;
    text-align: center;
    line-height: 1.5;
}

/* ========== CURRENCY SELECT ========== */
.pair-select {
    margin: 0 auto;
    width: 100%;
    max-width: 480px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;

    padding: 14px 20px;
    border-radius: 18px;

    border: 1px solid rgba(51,65,85,0.95);
    background: radial-gradient(circle at top left,
        rgba(56,189,248,0.22),
        rgba(15,23,42,0.98)
    );

    cursor: pointer;
    transition: 0.18s ease;
}

.pair-select:hover {
    background: radial-gradient(circle at top,
        rgba(56,189,248,0.26),
        rgba(15,23,42,0.98)
    );
    border-color: rgba(148,163,184,0.9);
    box-shadow: 0 16px 40px rgba(15,23,42,0.9);
    transform: translateY(-1px);
}

/* Dropdown */
.pair-dropdown {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 6px;

    width: 100%;
    max-width: 480px;

    background: rgba(15,23,42,0.96);
    border: 1px solid rgba(51,65,85,0.95);
    border-radius: 20px;

    box-shadow: 0 22px 50px rgba(0,0,0,0.55);

    max-height: 0;
    opacity: 0;
    pointer-events: none;
    overflow: hidden;

    transition: 0.25s ease;
    z-index: 50;
}

.pair-dropdown.open {
    max-height: 340px;
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) translateY(-6px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* Dropdown item */
.pair-item {
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border-radius: 12px;
    cursor: pointer;
    transition: 0.16s ease;
}

.pair-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pair-type-badge {
    margin-left: auto;
}

/* ========== ACTION BUTTONS ========== */
.signals-actions {
    display: flex;
    justify-content: center;
    gap: 18px;
    margin-top: 26px;
    flex-wrap: wrap;
}

.btn-main {
    padding: 12px 32px;
    font-size: 17px;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    background: linear-gradient(135deg, #00d9ff, #0066ff);
    color: #fff;
    box-shadow: 0 12px 32px rgba(0,153,255,0.25);
    transition: 0.2s ease;
}

.btn-main:hover {
    filter: brightness(1.12);
    transform: translateY(-2px);
}

.btn-secondary {
    padding: 12px 32px;
    font-size: 16px;
    border-radius: 999px;
    cursor: pointer;
    background: rgba(15,23,42,0.7);
    border: 1px solid rgba(148,163,184,0.45);
    color: #e5e7eb;
    backdrop-filter: blur(14px);
    transition: 0.2s ease;
}

.btn-secondary:hover {
    border-color: #00d9ff;
    box-shadow: 0 0 0 2px rgba(0,153,255,0.35);
    transform: translateY(-2px);
}

.signals-note {
    margin-top: 14px;
    opacity: 0.55;
    font-size: 13px;
}

/* ========== НЕОНОВІ ХВИЛІ ========== */
.signals-wave-bg {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 100vw;
    max-width: 100vw;

    top: 360px;

    height: 220px;
    pointer-events: none;
    z-index: 0;
    opacity: 0.95;
}

.signals-wave-svg {
    width: 100%;
    height: 100%;
}

.wave-path {
    fill: none;
    stroke-width: 22px;
    stroke-linecap: round;
    filter: url(#waveGlow);
    opacity: 0.95;
}

/* Активніша анімація */
.wave-1 {
    animation: waveMove1 18s ease-in-out infinite alternate;
}
.wave-2 {
    animation: waveMove2 22s ease-in-out infinite alternate;
}
.wave-3 {
    animation: waveMove3 25s ease-in-out infinite alternate;
}

@keyframes waveMove1 {
    0%   { transform: translateX(-8%) translateY(-12px) scaleY(1.06); }
    50%  { transform: translateX(3%) translateY(-20px) scaleY(1.1); }
    100% { transform: translateX(8%) translateY(-6px) scaleY(1.04); }
}

@keyframes waveMove2 {
    0%   { transform: translateX(8%) translateY(4px) scaleY(1.03); }
    50%  { transform: translateX(-6%) translateY(-14px) scaleY(1.09); }
    100% { transform: translateX(4%) translateY(2px) scaleY(1.04); }
}

@keyframes waveMove3 {
    0%   { transform: translateX(-6%) translateY(16px) scaleY(1.04); }
    50%  { transform: translateX(10%) translateY(-8px) scaleY(1.12); }
    100% { transform: translateX(-4%) translateY(12px) scaleY(1.03); }
}

/* ========== MOBILE ========== */
@media (max-width: 400px) {
    .signals-wave-bg {
        top: 285px;
        height: 180px;
        width: 110vw;
    }
}

@media (max-width: 768px) {

    .signals-setup {
        padding-top: 40px;
        padding-bottom: 80px;
    }

    .signals-title {
        font-size: 36px;
    }

    .chip {
        padding: 8px 16px;
        font-size: 13px;
    }

    .pair-select {
        max-width: 100%;
        padding: 12px 16px;
    }

    .signals-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .btn-main,
    .btn-secondary {
        width: 100%;
    }
}