/* ==========================================================================
   Signals Feed Terminal Sheet - INEHub Global Premium Theme
   ========================================================================== */

:root {
    --bg-dark: #0f111a;
    --card-bg: #161925;
    --card-hover: #1c2032;
    --accent-green: #00e676;
    --accent-blue: #00b0ff;
    --border-color: #24293e;
    --text-primary: #ffffff;
    --text-muted: #8a90a6;
    --signal-orange: #ff9100;
}

body.dark-theme {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
}

.signals-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    box-sizing: border-box;
}

/* Breadcrumb Layout */
.breadcrumb-nav {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 20px;
}
.breadcrumb-nav a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s ease;
}
.breadcrumb-nav a:hover {
    color: var(--accent-green);
}
.active-crumb {
    color: #cbd5e1;
    font-weight: 600;
}

/* Header Text Frame */
.signals-hero {
    text-align: center;
    margin-bottom: 45px;
}

.signals-hero h1 {
    font-size: 2.8rem;
    font-weight: 800;
    margin: 0 0 12px 0;
    letter-spacing: -1px;
    background: linear-gradient(135deg, #ffffff 0%, #8a90a6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Emoji inside gradient-clipped headings must be excluded from the
   -webkit-text-fill-color: transparent rule above, or the emoji
   renders desaturated/grey instead of its native color. Wrap any
   emoji in <span class="emoji-icon"> to keep it colorful. */
.emoji-icon {
    -webkit-text-fill-color: initial;
    background: none;
    -webkit-background-clip: initial;
    background-clip: initial;
    display: inline-block;
}

.signals-subtitle {
    font-size: 1.15rem;
    color: var(--text-muted);
    max-width: 750px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Master Segmented Control Selector Switch */
.ecosystem-switch-container {
    display: flex;
    justify-content: center;
    gap: 15px;
    background: #11131f;
    border: 1px solid var(--border-color);
    padding: 8px;
    border-radius: 50px;
    max-width: 550px;
    margin: 0 auto 50px auto;
}

.switch-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.25s ease;
}

.switch-btn:hover {
    color: #ffffff;
}

.switch-btn.active {
    background: linear-gradient(135deg, #1d233a 0%, #252d4a 100%);
    color: var(--accent-blue);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 4px 15px rgba(0,0,0,0.2);
    border: 1px solid rgba(0, 176, 255, 0.25);
    padding: 11px 23px;
}

/* Active Framework Display Control */
.asset-matrix-section {
    display: none;
}
.asset-matrix-section.active {
    display: block;
    animation: fadeIn 0.4s ease-in-out;
}

/* Category Grid Structure */
.category-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin-bottom: 55px;
}

.category-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 26px;
    cursor: pointer;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.category-card:hover {
    transform: translateY(-5px);
    border-color: rgba(0, 176, 255, 0.4);
    background: var(--card-hover);
    box-shadow: 0 10px 25px rgba(0, 176, 255, 0.08);
}

/* Hot / Active Signals Highlight Overlay */
.hot-category {
    border: 1px solid rgba(255, 145, 0, 0.2);
}
.hot-category:hover {
    border-color: var(--signal-orange);
    box-shadow: 0 10px 25px rgba(255, 145, 0, 0.08);
}

.card-icon {
    font-size: 1.8rem;
    color: var(--accent-blue);
    margin-bottom: 16px;
}
.hot-category .card-icon {
    color: var(--signal-orange);
}

.category-card h3 {
    font-size: 1.3rem;
    margin: 0 0 10px 0;
    font-weight: 700;
}

.category-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin: 0 0 20px 0;
}

/* Launch Button Layout Inside Card */
.btn-select-category {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--accent-green);
    display: flex;
    align-items: center;
    gap: 6px;
    transition: gap 0.2s ease;
}
.category-card:hover .btn-select-category {
    gap: 12px;
}

/* Dynamic Interactive Status Stream Banner Panel */
.status-panel-hidden {
    display: none;
}
.status-panel-visible {
    display: block;
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #10121d;
    border: 1px solid var(--accent-green);
    padding: 15px 25px;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    z-index: 1000;
    animation: slideUp 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.status-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.status-content p {
    margin: 0;
    font-size: 0.92rem;
    color: #ffffff;
}

.pulse-indicator {
    width: 10px;
    height: 10px;
    background: var(--accent-green);
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(0, 230, 118, 0.7);
    animation: indicatorPulse 1.5s infinite;
}

/* Global Directory Disclaimer Fixes */
.directory-disclaimer-panel {
    border-top: 1px solid var(--border-color);
    padding: 30px 10px;
    margin-top: 20px;
    margin-bottom: 40px;
    text-align: center;
}

.directory-disclaimer-panel p {
    font-size: 0.85rem;
    line-height: 1.6;
    color: #64748b;
    max-width: 900px;
    margin: 0 auto;
}

/* ==========================================================================
   Animations & Responsive Breakpoints
   ========================================================================== */

@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideUp { from { transform: translateY(50px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes indicatorPulse { 
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 230, 118, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(0, 230, 118, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 230, 118, 0); }
}

@media (max-width: 1100px) {
    .category-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .signals-hero h1 { font-size: 2.2rem; }
    .category-grid { grid-template-columns: 1fr; gap: 20px; }
    .ecosystem-switch-container { flex-direction: column; border-radius: 16px; padding: 10px; }
    .switch-btn { width: 100%; justify-content: center; }
}

/* ==========================================================================
   AFFILIATE REQUEST MODAL — append this block to the BOTTOM of your
   existing src/styles/signals.css file. Uses the same :root variables
   already defined at the top of that file (--card-bg, --accent-green,
   --accent-blue, --border-color, --text-muted, etc.) so it matches the
   rest of the Signals Feed Terminal theme automatically.
   ========================================================================== */

/* =========================================================
   AFFILIATE REQUEST SECTION (page-embedded, not a modal)
========================================================= */
.affiliate-request-section {
    display: flex;
    justify-content: center;
    margin-bottom: 50px;
}

.affiliate-request-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    width: 100%;
    max-width: 520px;
    padding: 32px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.35);
    animation: fadeIn 0.4s ease-in-out;
}

/* =========================================================
   FORM GROUPS INSIDE MODAL
========================================================= */
.affiliate-form-group {
    margin-bottom: 18px;
}

.affiliate-form-group label {
    display: block;
    margin-bottom: 8px;
    color: #cbd5e1;
    font-size: 0.85rem;
    font-weight: 600;
}

.affiliate-or-divider {
    display: flex;
    align-items: center;
    margin: 16px 0;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.affiliate-or-divider::before,
.affiliate-or-divider::after {
    content: "";
    flex: 1;
    border-bottom: 1px solid var(--border-color);
    margin: 0 10px;
}

/* =========================================================
   DROPDOWN (SELECT) — matches signals.css premium feel
========================================================= */
.affiliate-select {
    width: 100%;
    padding: 12px 15px;
    background: #11131f;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.92rem;
    cursor: pointer;
    outline: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a90a6' stroke-width='2'><polyline points='6 9 12 15 18 9'/></svg>");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 18px;
    padding-right: 40px;
}

.affiliate-select:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 8px rgba(0, 176, 255, 0.25);
}

.affiliate-select option {
    background: #11131f;
    color: var(--text-primary);
}

/* =========================================================
   ACCOUNT ID TEXT INPUT
========================================================= */
.affiliate-text-input {
    width: 100%;
    padding: 12px 15px;
    background: #11131f;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.92rem;
    outline: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.affiliate-text-input:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 8px rgba(0, 176, 255, 0.25);
}

.affiliate-text-input::placeholder {
    color: #5a5f78;
}

/* =========================================================
   SELECTED PLATFORM INDICATOR
========================================================= */
.affiliate-selected-label {
    display: inline-block;
    margin-top: 6px;
    font-size: 0.8rem;
    color: var(--accent-green);
    font-weight: 600;
    min-height: 1.2em;
}

/* =========================================================
   SEND BUTTON
========================================================= */
.affiliate-send-btn {
    width: 100%;
    background: linear-gradient(135deg, var(--accent-green), #00b85f);
    color: #06150e;
    border: none;
    padding: 14px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.98rem;
    transition: all 0.3s ease;
    margin-top: 6px;
}

.affiliate-send-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 230, 118, 0.35);
}

.affiliate-send-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* =========================================================
   FORM FEEDBACK MESSAGES
========================================================= */
.form-message {
    display: none;
    margin-top: 16px;
    padding: 12px 15px;
    border-radius: 8px;
    font-size: 0.84rem;
    line-height: 1.5;
}

.form-message--success {
    background: rgba(0, 230, 118, 0.1);
    border: 1px solid rgba(0, 230, 118, 0.3);
    color: var(--accent-green);
}

.form-message--error {
    background: rgba(255, 145, 0, 0.1);
    border: 1px solid rgba(255, 145, 0, 0.3);
    color: var(--signal-orange);
}

.form-message--info {
    background: rgba(0, 176, 255, 0.1);
    border: 1px solid rgba(0, 176, 255, 0.3);
    color: var(--accent-blue);
}

/* =========================================================
   MOBILE
========================================================= */
@media (max-width: 480px) {
    .affiliate-request-card {
        padding: 22px;
    }
}

/* =========================================================
   AFFILIATE REQUEST STATUS BANNER
   Shown inside the modal when the user has an existing
   affiliate_requests/{uid} record (pending / approved / rejected).
========================================================= */
.affiliate-status-banner {
    display: none;
    padding: 16px 18px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 0.88rem;
    line-height: 1.55;
}

.affiliate-status-banner strong {
    display: block;
    font-size: 0.95rem;
    margin-bottom: 6px;
}

.affiliate-status-banner p {
    margin: 0 0 10px 0;
    color: inherit;
    opacity: 0.92;
}

.affiliate-status-banner p:last-child {
    margin-bottom: 0;
}

.affiliate-status-banner--pending {
    background: rgba(0, 176, 255, 0.1);
    border: 1px solid rgba(0, 176, 255, 0.3);
    color: var(--accent-blue);
}

.affiliate-status-banner--approved {
    background: rgba(0, 230, 118, 0.1);
    border: 1px solid rgba(0, 230, 118, 0.3);
    color: var(--accent-green);
}

.affiliate-status-banner--rejected {
    background: rgba(255, 145, 0, 0.1);
    border: 1px solid rgba(255, 145, 0, 0.3);
    color: var(--signal-orange);
}

.affiliate-status-link {
    display: inline-block;
    margin-top: 8px;
    padding: 9px 16px;
    background: var(--signal-orange);
    color: #1a0f00;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.82rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.affiliate-status-link:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 145, 0, 0.3);
}

/* Disabled "already requested" dropdown options need to look
   visibly inactive, not just greyed via default browser style */
.affiliate-select option:disabled {
    color: #5a5f78;
    font-style: italic;
}

/* =========================================================
   PLATFORM PREVIEW (logo + review link + create-account prompt)
   Shown after a Broker/Exchange is selected in either dropdown.
========================================================= */
.affiliate-platform-preview {
    background: #11131f;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 16px;
    margin: 16px 0;
}

.affiliate-platform-preview-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
}

.affiliate-platform-logo {
    width: 48px;
    height: 48px;
    object-fit: contain;
    border-radius: 8px;
    background: #ffffff;
    padding: 6px;
    flex-shrink: 0;
}

.affiliate-platform-preview-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.affiliate-platform-name {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--text-primary);
}

.affiliate-platform-review-link {
    font-size: 0.8rem;
    color: var(--accent-blue);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.affiliate-platform-review-link:hover {
    text-decoration: underline;
}

.affiliate-account-prompt {
    border-top: 1px solid var(--border-color);
    padding-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.affiliate-account-prompt p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.affiliate-create-account-btn {
    display: inline-block;
    text-align: center;
    padding: 10px 16px;
    background: linear-gradient(135deg, var(--accent-blue), #0090d4);
    color: #ffffff;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.affiliate-create-account-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 176, 255, 0.3);
}

/* =========================================================
   TERMINAL ACCESS BUTTONS (shown when status === approved)
========================================================= */
.affiliate-terminal-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 14px;
}

.affiliate-terminal-btn {
    flex: 1;
    min-width: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 18px;
    background: linear-gradient(135deg, var(--accent-green), #00b85f);
    color: #06150e;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.88rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.affiliate-terminal-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 230, 118, 0.35);
}

.affiliate-terminal-btn--crypto {
    background: linear-gradient(135deg, var(--accent-blue), #0090d4);
    color: #ffffff;
}

.affiliate-terminal-btn--crypto:hover {
    box-shadow: 0 4px 15px rgba(0, 176, 255, 0.35);
}

@media (max-width: 480px) {
    .affiliate-terminal-buttons {
        flex-direction: column;
    }
    .affiliate-platform-preview-header {
        flex-wrap: wrap;
    }
}

/* =========================================================
   TERMINAL ACCESS SECTION (always visible, above the request form)
========================================================= */
.affiliate-terminal-access-section {
    display: flex;
    justify-content: center;
    margin-bottom: 24px;
}

.affiliate-terminal-buttons--top {
    width: 100%;
    max-width: 520px;
}