/* ==========================================================================
   WRS TREND — Post-An-Ad Hero Engine (wrs-post-ad-hero.css) — v8.0
   Rebuilt 2026-08-23 after confirmed data loss of the original v7.3 asset
   (no recovered source existed anywhere on server or local machine — this
   is a from-scratch reconstruction based on the reference screenshot and
   the verified DOM/selector contract already consumed by wrs-post-ad-hero.js
   and the rtcl_remaining_free_ads_success_text filter in functions.php).

   SINGLE WIRING AUTHORITY: this file is the ONLY place that themes
   .rtcl-notices-wrapper / .rtcl-message.alert on the /post-an-ad/ page.
   It resets RTCL's default Bootstrap-style alert boxes (the pale pink/green
   cards visible before this file existed) instead of patching over them,
   so there is exactly one source of truth for this region — no stacked
   !important layers, no duplicate rules elsewhere.

   Uses ONLY tokens already defined in wrstrend-design-system-v6.1.css.
   لا يوجد أي لون أو قيمة مُخترعة هنا — كل قيمة مأخوذة من نظام التصميم الموحد.
   ========================================================================== */

/* --------------------------------------------------------------------
   1) SINGLE-AUTHORITY RESET for RTCL's default notice boxes on this page.
      Replaces the default Bootstrap .alert / .alert-success / .alert-error
      pale cards with the dark glass identity. This is the fix for the
      white/pale layering reported in the screenshot.
   -------------------------------------------------------------------- */
body.rtcl-form-page .rtcl-notices-wrapper {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 24px;
}

body.rtcl-form-page .rtcl-notices-wrapper .rtcl-message.alert {
    background: var(--wrs-brand-surface);
    border: 1px solid var(--wrs-brand-line);
    border-radius: var(--wrs-brand-radius, 14px);
    box-shadow: none;
    padding: 0;
    margin: 0;
    color: var(--wrs-brand-text);
    overflow: hidden;
}

/* Error/notice variant: simple themed card (no hero markup inside it) */
body.rtcl-form-page .rtcl-notices-wrapper .rtcl-message.alert-error,
body.rtcl-form-page .rtcl-notices-wrapper .rtcl-message.alert-danger {
    padding: 14px 18px;
    border-color: rgba(239, 68, 68, 0.35);
    background: rgba(239, 68, 68, 0.08);
    color: #fca5a5;
    font-size: 13.5px;
}

/* Success variant wraps our .wrs-post-hero — let the hero own its own padding */
body.rtcl-form-page .rtcl-notices-wrapper .rtcl-message.alert-success {
    border-color: var(--wrs-brand-line);
    background: var(--wrs-brand-surface);
}

/* --------------------------------------------------------------------
   2) HERO CONTAINER
   -------------------------------------------------------------------- */
.wrs-post-hero {
    position: relative;
    padding: 28px 26px 26px;
    background:
        radial-gradient(120% 140% at 0% 0%, var(--wrs-accent-a06, rgba(78,255,139,0.06)) 0%, transparent 60%),
        var(--wrs-brand-bg-2);
    color: var(--wrs-brand-text);
    font-family: inherit;
}

.wrs-post-hero__kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 999px;
    background: var(--wrs-accent-a10, rgba(78,255,139,0.10));
    border: 1px solid var(--wrs-brand-line-strong);
    color: var(--wrs-brand-accent);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.wrs-post-hero__kicker-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--wrs-brand-accent);
    box-shadow: 0 0 8px var(--wrs-brand-accent);
    flex: none;
}

.wrs-post-hero__title {
    margin: 0 0 10px;
    font-size: clamp(24px, 3.4vw, 34px);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: var(--wrs-brand-text);
}

.wrs-post-hero__title-accent {
    color: var(--wrs-brand-accent);
}

.wrs-post-hero__sub {
    max-width: 640px;
    margin: 0 0 26px;
    font-size: 14.5px;
    line-height: 1.6;
    color: var(--wrs-brand-text-2);
}

/* --------------------------------------------------------------------
   3) STATS GRID — 3 glass cards
   -------------------------------------------------------------------- */
.wrs-post-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 28px;
}

@media (max-width: 782px) {
    .wrs-post-stats-grid { grid-template-columns: 1fr; }
}

.wrs-post-glass-card {
    position: relative;
    border-radius: var(--wrs-brand-radius-sm, 12px);
    border: 1px solid var(--wrs-brand-line);
    background: var(--wrs-glass-surface-2, rgba(255,255,255,0.07));
    backdrop-filter: var(--wrs-glass-blur-sm, blur(10px));
    -webkit-backdrop-filter: var(--wrs-glass-blur-sm, blur(10px));
    overflow: hidden;
    transition: border-color var(--wrs-duration-base, .25s) var(--wrs-ease-standard, ease),
                transform var(--wrs-duration-base, .25s) var(--wrs-ease-standard, ease);
}

.wrs-post-glass-card:hover {
    border-color: var(--wrs-brand-line-strong);
    transform: translateY(-2px);
}

/* Subsurface mouse glow — position set inline by wrs-post-ad-hero.js */
.wrs-post-glass-card__glow {
    position: absolute;
    width: 180px;
    height: 180px;
    left: 0;
    top: 0;
    background: radial-gradient(circle, var(--wrs-accent-a20, rgba(78,255,139,0.20)) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    pointer-events: none;
    opacity: 0;
    transition: opacity var(--wrs-duration-fast, .15s) ease;
}

.wrs-post-glass-card:hover .wrs-post-glass-card__glow {
    opacity: 1;
}

.wrs-post-glass-card__inner {
    position: relative;
    z-index: 1;
    padding: 18px 18px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.wrs-post-card-icon {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    font-size: 14px;
}

.wrs-post-card-icon--warning { background: rgba(247, 164, 39, 0.14); color: var(--wrs-brand-warning); }
.wrs-post-card-icon--accent  { background: var(--wrs-accent-a15, rgba(78,255,139,0.15)); color: var(--wrs-brand-accent); }
.wrs-post-card-icon--text    { background: rgba(255,255,255,0.08); color: var(--wrs-brand-text-2); }

.wrs-post-card-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--wrs-brand-text-2);
}

.wrs-post-card-value {
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--wrs-brand-text);
    line-height: 1;
}

.wrs-post-card-value--warning { color: var(--wrs-brand-warning); }
.wrs-post-card-value--accent  { color: var(--wrs-brand-accent); }

/* --------------------------------------------------------------------
   4) PIPELINE
   -------------------------------------------------------------------- */
.wrs-post-pipeline__header {
    margin-bottom: 12px;
}

.wrs-post-pipeline__title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--wrs-brand-text-2);
}

.wrs-post-pipeline__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 22px;
}

@media (max-width: 782px) {
    .wrs-post-pipeline__grid { grid-template-columns: 1fr; }
}

.wrs-post-pipeline-step {
    padding: 16px 16px 18px;
    border-radius: var(--wrs-brand-radius-sm, 12px);
    border: 1px solid var(--wrs-brand-line);
    background: var(--wrs-brand-surface);
}

.wrs-post-step-num {
    display: block;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.03em;
    color: var(--wrs-brand-accent);
    margin-bottom: 8px;
}

.wrs-post-step-desc {
    margin: 0;
    font-size: 13px;
    line-height: 1.55;
    color: var(--wrs-brand-text-2);
}

/* --------------------------------------------------------------------
   5) INFO NOTE
   -------------------------------------------------------------------- */
.wrs-post-note {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 16px;
    border-radius: var(--wrs-brand-radius-sm, 12px);
    border: 1px solid rgba(247, 164, 39, 0.25);
    background: rgba(247, 164, 39, 0.08);
}

.wrs-post-note__icon {
    color: var(--wrs-brand-warning);
    font-size: 14px;
    margin-top: 1px;
    flex: none;
}

.wrs-post-note__text {
    margin: 0;
    font-size: 13px;
    line-height: 1.55;
    color: var(--wrs-brand-text-2);
}
