/* Candlestick Pattern Scanner – professional dark theme */

body.rsi-dark-page {
    background: #0b0f14 !important;
    color: #e2e8f0 !important;
    padding-top: 70px !important;
}

body.rsi-dark-page .container-fluid {
    background: transparent !important;
}

body.rsi-dark-page .hero {
    background: linear-gradient(135deg, #1e3a5f 0%, #312e81 100%) !important;
    border: 1px solid rgba(59, 130, 246, 0.25);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35) !important;
}

body.rsi-dark-page .hero h1 {
    color: #f8fafc !important;
}

body.rsi-dark-page .hero p {
    color: #cbd5e1 !important;
    opacity: 1 !important;
}

body.rsi-dark-page .hero-link {
    color: #93c5fd !important;
}

body.rsi-dark-page .controls,
body.rsi-dark-page .info-card {
    background: #141b26 !important;
    border: 1px solid #2a3544 !important;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35) !important;
}

body.rsi-dark-page .form-label {
    color: #94a3b8 !important;
    font-size: 0.82rem;
    font-weight: 600;
}

body.rsi-dark-page .form-control,
body.rsi-dark-page .form-select {
    background: #0c1219 !important;
    border: 1px solid #2a3544 !important;
    color: #e2e8f0 !important;
}

body.rsi-dark-page .form-control:focus,
body.rsi-dark-page .form-select:focus {
    background: #0c1219 !important;
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2) !important;
    color: #f8fafc !important;
}

body.rsi-dark-page .form-control::placeholder {
    color: #64748b !important;
}

body.rsi-dark-page .btn-primary {
    background: #2563eb !important;
    border-color: #2563eb !important;
}

body.rsi-dark-page .btn-primary:hover {
    background: #1d4ed8 !important;
    border-color: #1d4ed8 !important;
}

body.rsi-dark-page .btn-outline-primary {
    color: #60a5fa !important;
    border-color: #3b82f6 !important;
    background: transparent !important;
}

body.rsi-dark-page .btn-outline-primary:hover {
    background: rgba(59, 130, 246, 0.12) !important;
    color: #93c5fd !important;
}

body.rsi-dark-page .btn-outline-secondary {
    color: #94a3b8 !important;
    border-color: #2a3544 !important;
    background: transparent !important;
}

body.rsi-dark-page .btn-outline-secondary:hover {
    background: #1a2332 !important;
    color: #e2e8f0 !important;
}

body.rsi-dark-page .chip {
    background: #1a2332 !important;
    border-color: #2a3544 !important;
    color: #cbd5e1 !important;
}

body.rsi-dark-page .chip.bullish {
    background: rgba(16, 185, 129, 0.15) !important;
    color: #6ee7b7 !important;
    border-color: rgba(16, 185, 129, 0.25) !important;
}

body.rsi-dark-page .chip.bearish {
    background: rgba(239, 68, 68, 0.15) !important;
    color: #fca5a5 !important;
    border-color: rgba(239, 68, 68, 0.25) !important;
}

body.rsi-dark-page .chip.neutral {
    background: rgba(245, 158, 11, 0.12) !important;
    color: #fbbf24 !important;
    border-color: rgba(245, 158, 11, 0.25) !important;
}

body.rsi-dark-page .loading-message {
    color: #60a5fa !important;
}

body.rsi-dark-page .table-wrap,
body.rsi-dark-page .candlestick-pattern-table-scroll {
    border-color: #2a3544 !important;
    background: #0c1219 !important;
}

body.rsi-dark-page #tbl th,
body.rsi-dark-page #candlestickPatternTable th {
    background: #1a2332 !important;
    color: #94a3b8 !important;
    border-bottom-color: #2a3544 !important;
}

body.rsi-dark-page #tbl td,
body.rsi-dark-page #candlestickPatternTable td {
    color: #e2e8f0 !important;
    border-bottom-color: #1e293b !important;
    background: transparent !important;
}

body.rsi-dark-page #tbl tbody tr:hover td,
body.rsi-dark-page #candlestickPatternTable tbody tr:hover td {
    background: rgba(59, 130, 246, 0.04) !important;
}

body.rsi-dark-page #tbl td.signal-long,
body.rsi-dark-page #tbl .signal-long,
body.rsi-dark-page #candlestickPatternTable td.signal-long,
body.rsi-dark-page #candlestickPatternTable .signal-long {
    background: rgba(16, 185, 129, 0.2) !important;
    color: #6ee7b7 !important;
}

body.rsi-dark-page #tbl td.signal-short,
body.rsi-dark-page #tbl .signal-short,
body.rsi-dark-page #candlestickPatternTable td.signal-short,
body.rsi-dark-page #candlestickPatternTable .signal-short {
    background: rgba(239, 68, 68, 0.2) !important;
    color: #fca5a5 !important;
}

body.rsi-dark-page #tbl td.signal-neutral,
body.rsi-dark-page #tbl .signal-neutral,
body.rsi-dark-page #candlestickPatternTable td.signal-neutral,
body.rsi-dark-page #candlestickPatternTable .signal-neutral {
    background: rgba(100, 116, 139, 0.25) !important;
    color: #cbd5e1 !important;
}

body.rsi-dark-page .muted,
body.rsi-dark-page #pageInfo {
    color: #94a3b8 !important;
}

body.rsi-dark-page #paginationControls button {
    background: #1a2332 !important;
    border-color: #2a3544 !important;
    color: #e2e8f0 !important;
}

body.rsi-dark-page #paginationControls button:hover:not(:disabled) {
    background: #2563eb !important;
    border-color: #2563eb !important;
    color: #fff !important;
}

body.rsi-dark-page .info-card h2,
body.rsi-dark-page .info-card h3,
body.rsi-dark-page .faq-q {
    color: #f8fafc !important;
}

body.rsi-dark-page .info-card p,
body.rsi-dark-page .info-card ul,
body.rsi-dark-page .faq-a {
    color: #94a3b8 !important;
}

body.rsi-dark-page .info-card a {
    color: #60a5fa !important;
}

body.rsi-dark-page .info-card a:hover {
    color: #93c5fd !important;
}

body.rsi-dark-page .faq-item {
    border-top-color: #2a3544 !important;
}

body.rsi-dark-page .footer-simple {
    background: #0c1219 !important;
    border-top: 1px solid #2a3544 !important;
    color: #64748b !important;
}

body.rsi-dark-page #tbl a,
body.rsi-dark-page #candlestickPatternTable a {
    color: #60a5fa !important;
    font-weight: 600;
}

/* Horizontal scroll + sticky symbol column */
body.rsi-dark-page.candlestick-pattern-page .candlestick-pattern-table-scroll {
    max-height: min(62vh, calc(100vh - 320px));
    overflow: auto !important;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    background: #0c1219 !important;
    border: 1px solid #2a3544 !important;
    border-radius: 10px;
    position: relative;
}

body.rsi-dark-page.candlestick-pattern-page .candlestick-pattern-table-scroll::after {
    content: "← scroll for all columns →";
    display: block;
    text-align: center;
    font-size: 10px;
    color: #64748b;
    padding: 6px 0 4px;
    background: #0c1219;
    position: sticky;
    left: 0;
    bottom: 0;
}

body.rsi-dark-page.candlestick-pattern-page #candlestickPatternTable {
    width: max-content !important;
    min-width: 100% !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    table-layout: auto !important;
}

body.rsi-dark-page.candlestick-pattern-page #candlestickPatternTable th,
body.rsi-dark-page.candlestick-pattern-page #candlestickPatternTable td {
    white-space: nowrap;
    padding: 9px 10px !important;
}

body.rsi-dark-page.candlestick-pattern-page #candlestickPatternTable thead th {
    position: sticky !important;
    top: 0 !important;
    z-index: 4 !important;
    box-shadow: 0 1px 0 #2a3544 !important;
}

body.rsi-dark-page.candlestick-pattern-page #candlestickPatternTable th:first-child,
body.rsi-dark-page.candlestick-pattern-page #candlestickPatternTable td:first-child {
    position: sticky !important;
    left: 0 !important;
    z-index: 3 !important;
    box-shadow: 4px 0 14px rgba(0, 0, 0, 0.45) !important;
    border-right: 1px solid #2a3544 !important;
    background-color: #0c1219 !important;
    text-align: left !important;
    padding-left: 16px !important;
}

body.rsi-dark-page.candlestick-pattern-page #candlestickPatternTable thead th:first-child {
    z-index: 8 !important;
    background-color: #1a2332 !important;
}

body.rsi-dark-page.candlestick-pattern-page #candlestickPatternTable tbody tr:nth-child(even) td:not(:first-child) {
    background: rgba(26, 35, 50, 0.35) !important;
}

html[dir="rtl"] body.rsi-dark-page.candlestick-pattern-page #candlestickPatternTable th:first-child,
html[dir="rtl"] body.rsi-dark-page.candlestick-pattern-page #candlestickPatternTable td:first-child {
    left: auto !important;
    right: 0 !important;
    box-shadow: -4px 0 14px rgba(0, 0, 0, 0.45) !important;
    border-right: none !important;
    border-left: 1px solid #2a3544 !important;
    text-align: right !important;
    padding-right: 16px !important;
}

/* SEO + FAQ sections (centered card layout, match Watchlist / Supertrend) */
body.rsi-dark-page.candlestick-pattern-page .cps-seo-wrap {
    max-width: 1320px;
    margin: 0 auto;
    padding: 20px 16px 40px;
}

body.rsi-dark-page.candlestick-pattern-page .seo-description-section {
    margin-top: 4px !important;
}

body.rsi-dark-page.candlestick-pattern-page .seo-description-section .card {
    background: #141b26 !important;
    border: 1px solid #2a3544 !important;
    border-radius: 14px !important;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35) !important;
    overflow: hidden;
}

body.rsi-dark-page.candlestick-pattern-page .seo-description-section .card::before {
    content: "";
    display: block;
    height: 4px;
    background: linear-gradient(90deg, #1d4ed8, #06b6d4, #a855f7);
}

body.rsi-dark-page.candlestick-pattern-page .seo-description-section .card-body {
    color: #94a3b8 !important;
}

body.rsi-dark-page.candlestick-pattern-page .seo-description-section h2,
body.rsi-dark-page.candlestick-pattern-page .seo-description-section h3 {
    color: #f1f5f9 !important;
}

body.rsi-dark-page.candlestick-pattern-page .seo-description-section h2 {
    font-weight: 900 !important;
    letter-spacing: -0.02em;
    margin-bottom: 14px !important;
    padding-bottom: 10px !important;
    border-bottom: 2px solid rgba(96, 165, 250, 0.25) !important;
}

body.rsi-dark-page.candlestick-pattern-page .seo-description-section h2::before {
    content: "▸";
    display: inline-block;
    margin-inline-end: 10px;
    color: #60a5fa !important;
}

body.rsi-dark-page.candlestick-pattern-page .seo-description-section .alert-info {
    background: #1a2332 !important;
    border: 1px solid #2a3544 !important;
    color: #94a3b8 !important;
}

body.rsi-dark-page.candlestick-pattern-page .seo-description-section .alert-heading {
    color: #e2e8f0 !important;
}

body.rsi-dark-page.candlestick-pattern-page .seo-description-section a {
    color: #60a5fa !important;
}

body.rsi-dark-page.candlestick-pattern-page .cps-glossary-list {
    columns: 2;
    column-gap: 2rem;
    padding-inline-start: 1.25rem;
}

body.rsi-dark-page.candlestick-pattern-page .cps-glossary-list li {
    break-inside: avoid;
    margin-bottom: 0.35rem;
}

@media (max-width: 768px) {
    body.rsi-dark-page.candlestick-pattern-page .cps-glossary-list {
        columns: 1;
    }
}

html[dir="rtl"] body.rsi-dark-page.candlestick-pattern-page .seo-description-section h2::before {
    content: "◂";
    margin-inline-end: 0;
    margin-inline-start: 10px;
}

html[dir="rtl"] body.rsi-dark-page.candlestick-pattern-page .seo-description-section .row {
    direction: rtl;
}
