/**
 * RaiderTrader — assets/css/raidertrader.css
 *
 * Supplemental styles loaded after style.css.
 * Contains: page-specific layouts, card-detail page,
 * dashboard, pricing page, Elementor widget overrides,
 * and animation polish.
 *
 * All design tokens are defined in style.css — do not
 * redefine :root variables here.
 */

/* ─────────────────────────────────────────
   PAGE: HOMEPAGE HERO
───────────────────────────────────────── */

.rt-hero__tagline {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    color: var(--rt-muted);
    max-width: 560px;
    margin: 16px auto 0;
    line-height: 1.65;
}

.rt-hero__live-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(76, 175, 110, 0.1);
    border: 1px solid rgba(76, 175, 110, 0.25);
    border-radius: 20px;
    padding: 5px 12px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--rt-green);
    margin-bottom: 20px;
}

.rt-hero__live-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--rt-green);
    animation: rt-pulse 1.8s infinite;
}

/* Diagonal gold accent line above the hero */
.rt-hero-accent {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--rt-gold), transparent);
    opacity: 0.6;
}

/* ─────────────────────────────────────────
   PAGE: DEALS / FEED
───────────────────────────────────────── */

.rt-page-deals {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

.rt-page-deals__header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.rt-page-deals__title {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--rt-white);
}

.rt-page-deals__sub {
    font-size: 0.85rem;
    color: var(--rt-muted);
    margin-top: 4px;
}

/* Deal card — enhanced hover state with gold shimmer */
.rt-deal-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--rt-radius-lg);
    background: linear-gradient(135deg, rgba(186, 117, 23, 0.04) 0%, transparent 60%);
    opacity: 0;
    transition: opacity var(--rt-transition);
    pointer-events: none;
}

.rt-deal-card:hover::after {
    opacity: 1;
}

/* High-score deals get a subtle gold border highlight */
.rt-deal-card[data-score-high] {
    border-color: rgba(186, 117, 23, 0.35);
}

/* ─────────────────────────────────────────
   PAGE: CARD DETAIL
───────────────────────────────────────── */

.rt-card-detail-grid {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 32px;
    align-items: start;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

.rt-card-detail-image {
    position: sticky;
    top: 80px;
}

.rt-card-detail-image img {
    width: 100%;
    border-radius: var(--rt-radius-lg);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.6);
    transition: transform 0.3s ease;
}

.rt-card-detail-image img:hover {
    transform: scale(1.03);
}

.rt-card-detail-body {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.rt-card-detail-name {
    font-size: clamp(1.5rem, 4vw, 2.2rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--rt-white);
    line-height: 1.15;
}

.rt-card-detail-meta {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

/* Flip panel — the active deal for this card */
.rt-flip-panel {
    background: var(--rt-bg-card);
    border: 1px solid var(--rt-gold-dim);
    border-radius: var(--rt-radius-lg);
    padding: 24px;
    box-shadow: var(--rt-shadow-gold);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.rt-flip-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.rt-flip-panel__title {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--rt-gold);
}

.rt-flip-panel__metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--rt-border);
    border-radius: var(--rt-radius);
    overflow: hidden;
}

.rt-flip-panel__metric {
    background: var(--rt-bg-surface);
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.rt-flip-panel__metric-value {
    font-size: 1.2rem;
    font-weight: 800;
    font-family: var(--rt-font-mono);
    color: var(--rt-white);
}

.rt-flip-panel__metric-value.green  { color: var(--rt-green); }
.rt-flip-panel__metric-value.gold   { color: var(--rt-gold);  }

.rt-flip-panel__metric-label {
    font-size: 0.7rem;
    color: var(--rt-muted);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.rt-flip-panel__actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* eBay sold comps table */
.rt-comps-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.rt-comps-table th {
    text-align: left;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--rt-muted);
    padding: 10px 12px;
    border-bottom: 1px solid var(--rt-border);
}

.rt-comps-table td {
    padding: 12px;
    border-bottom: 1px solid var(--rt-border);
    color: var(--rt-muted);
    vertical-align: middle;
}

.rt-comps-table td:first-child {
    color: var(--rt-white);
    font-weight: 600;
}

.rt-comps-table td.price {
    font-family: var(--rt-font-mono);
    font-weight: 700;
    color: var(--rt-gold);
}

.rt-comps-table tr:last-child td {
    border-bottom: none;
}

.rt-comps-table tr:hover td {
    background: rgba(241, 239, 232, 0.03);
}

/* ─────────────────────────────────────────
   PAGE: PRICING
───────────────────────────────────────── */

.rt-pricing-page {
    max-width: 800px;
    margin: 0 auto;
    padding: 60px 20px;
    text-align: center;
}

.rt-pricing-page__headline {
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 12px;
}

.rt-pricing-page__sub {
    font-size: 1rem;
    color: var(--rt-muted);
    margin-bottom: 48px;
    line-height: 1.6;
}

/* Feature comparison row — used between pricing cards */
.rt-feature-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 40px;
    text-align: left;
}

.rt-feature-table th {
    padding: 12px 16px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--rt-muted);
    border-bottom: 2px solid var(--rt-border);
}

.rt-feature-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--rt-border);
    color: var(--rt-muted);
    font-size: 0.88rem;
}

.rt-feature-table td:first-child {
    color: var(--rt-white);
    font-weight: 500;
}

.rt-feature-table td.check {
    color: var(--rt-green);
    font-weight: 700;
    font-size: 1rem;
}

.rt-feature-table td.cross {
    color: var(--rt-border);
    font-size: 1rem;
}

.rt-feature-table tr:last-child td {
    border-bottom: none;
}

.rt-feature-table tr:hover td {
    background: rgba(241, 239, 232, 0.02);
}

/* Money-back guarantee badge */
.rt-guarantee-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 24px;
    padding: 10px 20px;
    border: 1px solid var(--rt-border);
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--rt-muted);
}

.rt-guarantee-badge strong {
    color: var(--rt-white);
}

/* ─────────────────────────────────────────
   PAGE: ACCOUNT / DASHBOARD
───────────────────────────────────────── */

.rt-dashboard-page {
    max-width: 860px;
    margin: 0 auto;
    padding: 0 20px;
}

.rt-dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
    flex-wrap: wrap;
    gap: 16px;
}

.rt-dashboard-greeting {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--rt-white);
}

.rt-plan-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.rt-plan-badge--pro {
    background: linear-gradient(135deg, var(--rt-gold), var(--rt-gold-light));
    color: #111210;
}

.rt-plan-badge--free {
    background: var(--rt-bg-surface);
    border: 1px solid var(--rt-border);
    color: var(--rt-muted);
}

/* Dashboard section headers */
.rt-dashboard-section {
    margin-bottom: 32px;
}

.rt-dashboard-section__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--rt-border);
}

.rt-dashboard-section__title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--rt-white);
}

/* ─────────────────────────────────────────
   ALERT WIDGET (price-alert-widget.php)
───────────────────────────────────────── */

.rt-alert-widget {
    background: var(--rt-bg-card);
    border: 1px solid var(--rt-border);
    border-radius: var(--rt-radius-lg);
    padding: 24px;
}

.rt-alert-widget__header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.rt-alert-widget__icon {
    font-size: 1.2rem;
}

.rt-alert-widget__title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--rt-white);
}

.rt-alert-widget__sub {
    font-size: 0.82rem;
    color: var(--rt-muted);
    margin-bottom: 16px;
    line-height: 1.5;
}

/* Pro lock state for alert widget */
.rt-alert-widget--locked {
    text-align: center;
    padding: 32px 24px;
}

.rt-alert-widget--locked .rt-lock-icon {
    font-size: 2rem;
    margin-bottom: 12px;
}

/* ─────────────────────────────────────────
   ELEMENTOR WIDGET WRAPPERS
───────────────────────────────────────── */

/* Remove default Elementor padding/margin from widget wrappers
   when inside the deals or card-detail page templates */
.rt-page-deals .elementor-widget-wrap,
.rt-card-detail .elementor-widget-wrap {
    padding: 0 !important;
}

/* Ensure Elementor text widgets inherit RaiderTrader colors */
.elementor-widget-text-editor p {
    color: var(--rt-muted);
    line-height: 1.7;
}

.elementor-widget-heading .elementor-heading-title {
    color: var(--rt-white);
}

/* ─────────────────────────────────────────
   LOADING OVERLAY
───────────────────────────────────────── */

.rt-loading-overlay {
    position: absolute;
    inset: 0;
    background: rgba(17, 18, 16, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    border-radius: var(--rt-radius-lg);
    backdrop-filter: blur(2px);
}

.rt-spinner {
    width: 28px;
    height: 28px;
    border: 3px solid var(--rt-border);
    border-top-color: var(--rt-gold);
    border-radius: 50%;
    animation: rt-spin 0.7s linear infinite;
}

@keyframes rt-spin {
    to { transform: rotate(360deg); }
}

/* ─────────────────────────────────────────
   TOOLTIPS
───────────────────────────────────────── */

[data-rt-tooltip] {
    position: relative;
    cursor: help;
}

[data-rt-tooltip]::after {
    content: attr(data-rt-tooltip);
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--rt-bg-surface);
    border: 1px solid var(--rt-border);
    border-radius: var(--rt-radius);
    padding: 6px 10px;
    font-size: 0.75rem;
    color: var(--rt-muted);
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease;
    z-index: 999;
    box-shadow: var(--rt-shadow);
}

[data-rt-tooltip]:hover::after {
    opacity: 1;
}

/* ─────────────────────────────────────────
   TRANSITIONS & ENTRANCE ANIMATIONS
───────────────────────────────────────── */

@keyframes rt-fade-up {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.rt-animate-in {
    animation: rt-fade-up 0.4s ease both;
}

/* Stagger deal cards on initial load */
.rt-deal-card:nth-child(1)  { animation: rt-fade-up 0.35s 0.00s ease both; }
.rt-deal-card:nth-child(2)  { animation: rt-fade-up 0.35s 0.05s ease both; }
.rt-deal-card:nth-child(3)  { animation: rt-fade-up 0.35s 0.10s ease both; }
.rt-deal-card:nth-child(4)  { animation: rt-fade-up 0.35s 0.15s ease both; }
.rt-deal-card:nth-child(5)  { animation: rt-fade-up 0.35s 0.20s ease both; }
.rt-deal-card:nth-child(n+6){ animation: rt-fade-up 0.35s 0.25s ease both; }

/* ─────────────────────────────────────────
   NAVIGATION BAR (if using a custom nav)
───────────────────────────────────────── */

.rt-nav {
    position: sticky;
    top: 0;
    z-index: 500;
    background: rgba(17, 18, 16, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--rt-border);
    padding: 0 24px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.rt-nav__logo {
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--rt-white) !important;
    text-decoration: none !important;
    display: flex;
    align-items: center;
    gap: 8px;
}

.rt-nav__logo span {
    color: var(--rt-gold);
}

.rt-nav__links {
    display: flex;
    align-items: center;
    gap: 24px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.rt-nav__links a {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--rt-muted) !important;
    text-decoration: none !important;
    transition: color var(--rt-transition);
}

.rt-nav__links a:hover,
.rt-nav__links a.active {
    color: var(--rt-white) !important;
}

.rt-nav__actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ─────────────────────────────────────────
   FOOTER
───────────────────────────────────────── */

.rt-footer {
    background: var(--rt-bg-surface);
    border-top: 1px solid var(--rt-border);
    padding: 40px 24px;
    margin-top: 80px;
    text-align: center;
}

.rt-footer__logo {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--rt-white);
    margin-bottom: 8px;
}

.rt-footer__logo span {
    color: var(--rt-gold);
}

.rt-footer__tagline {
    font-size: 0.82rem;
    color: var(--rt-muted);
    margin-bottom: 20px;
    font-style: italic;
}

.rt-footer__links {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.rt-footer__links a {
    font-size: 0.8rem;
    color: var(--rt-muted) !important;
    transition: color var(--rt-transition);
}

.rt-footer__links a:hover {
    color: var(--rt-gold) !important;
}

.rt-footer__copy {
    font-size: 0.75rem;
    color: var(--rt-muted);
    opacity: 0.5;
}

/* ─────────────────────────────────────────
   PRINT STYLES
───────────────────────────────────────── */

@media print {
    .rt-paywall-gate,
    .rt-nav,
    .rt-filters,
    .rt-pagination {
        display: none !important;
    }

    body {
        background: white !important;
        color: black !important;
    }
}

/* ─────────────────────────────────────────
   RESPONSIVE ADDITIONS
───────────────────────────────────────── */

@media (max-width: 900px) {
    .rt-card-detail-grid {
        grid-template-columns: 1fr;
    }

    .rt-card-detail-image {
        position: static;
        max-width: 200px;
        margin: 0 auto;
    }

    .rt-flip-panel__metrics {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 640px) {
    .rt-page-deals__header {
        flex-direction: column;
        align-items: flex-start;
    }

    .rt-dashboard-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .rt-nav__links {
        display: none; /* Mobile nav requires custom implementation */
    }

    .rt-flip-panel__metrics {
        grid-template-columns: 1fr;
    }

    .rt-flip-panel__actions {
        flex-direction: column;
    }

    .rt-flip-panel__actions .rt-btn {
        width: 100%;
        justify-content: center;
    }

    .rt-pricing-grid {
        grid-template-columns: 1fr;
    }
}
