/* ═══ Price Checker Page — Premium ══════════════════════════════════════════ */

.price-checker-page {
    min-height: 100vh;
}

/* ─── 3-column shell (side rails + main) ───────────────────────────────────── */
.price-checker-shell {
    --pc-rail-width: 240px;
    --pc-rail-gap: 16px;
    --pc-main-max: 1080px;
    display: flex;
    flex-direction: column;
    gap: 0;
    width: 100%;
    max-width: 100%;
    padding: 0 16px;
}

.price-checker-main {
    flex: 1;
    min-width: 0;
    max-width: var(--pc-main-max);
    margin: 0 auto;
    width: 100%;
}

.price-checker-side-rail {
    display: none;
}

.price-checker-side-rail__inner {
    display: flex;
    justify-content: center;
    position: relative;
}

/* Desktop: 3-column grid with sticky rails */
@media (min-width: 1200px) {
    .price-checker-shell {
        display: grid;
        grid-template-columns: var(--pc-rail-width) minmax(0, 1fr) var(--pc-rail-width);
        column-gap: var(--pc-rail-gap);
        align-items: start;
        max-width: calc(var(--pc-main-max) + (var(--pc-rail-width) * 2) + (var(--pc-rail-gap) * 2));
        margin: 0 auto;
        padding: 0 clamp(8px, 1vw, 16px);
    }

    .price-checker-side-rail {
        display: block;
        width: var(--pc-rail-width);
        min-width: var(--pc-rail-width);
        position: sticky;
        top: 80px;
        align-self: start;
        height: fit-content;
    }

    .price-checker-side-rail--left {
        grid-column: 1;
        grid-row: 1;
    }

    .price-checker-side-rail--right {
        grid-column: 3;
        grid-row: 1;
    }

    .price-checker-side-rail__inner {
        position: relative;
    }

    .price-checker-side-rail .dp-slot,
    .price-checker-side-rail .dp-slot__link,
    .price-checker-side-rail .dp-slot__frame,
    .price-checker-side-rail .dp-slot__frame--preview,
    .price-checker-side-rail .dp-slot__frame--live {
        width: 240px;
        min-width: 240px;
    }

    .price-checker-main {
        grid-column: 2;
        grid-row: 1;
        max-width: var(--pc-main-max);
        margin: 0 auto;
    }
}

/* ─── Hero ─────────────────────────────────────────────────────────────────── */
.price-checker-hero {
    padding: 56px 0 32px;
    max-width: 720px;
}

.price-checker-hero__eyebrow {
    margin: 0 0 10px;
    color: #bfe9ff;
    font-size: 0.8rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    font-weight: 700;
}

.price-checker-hero__title {
    margin: 0;
    font-size: clamp(2.1rem, 5vw, 3.4rem);
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #fff 0%, #b8d4ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.price-checker-hero__subtitle {
    margin: 18px 0 0;
    max-width: 560px;
    color: rgba(223, 235, 248, 0.84);
    font-size: 1.04rem;
    line-height: 1.7;
}

/* ─── Content ──────────────────────────────────────────────────────────────── */
.price-checker-page__content {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 20px 80px;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

/* ─── Panel (replaces the modal dialog) ────────────────────────────────────── */
.price-checker-page__panel {
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background:
        radial-gradient(circle at 50% 0%, rgba(92, 217, 240, 0.04), transparent 60%),
        rgba(15, 18, 28, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.04),
        0 12px 48px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* ─── Master-detail layout ─────────────────────────────────────────────────── */
.price-checker-layout {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

.price-checker-sidebar {
    flex-shrink: 0;
    padding: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.price-checker-main-area {
    flex: 1;
    min-width: 0;
    padding: 24px;
    min-height: 420px;
    overflow-y: auto;
}

/* ─── Empty state ──────────────────────────────────────────────────────────── */
.price-checker-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 48px 24px;
    gap: 12px;
}

.price-checker-empty-state.is-hidden {
    display: none;
}

.price-checker-empty-state__icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: rgba(92, 217, 240, 0.06);
    border: 1px solid rgba(92, 217, 240, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 4px;
}

.price-checker-empty-state__icon svg,
.price-checker-empty-state__icon i[data-lucide] {
    width: 26px;
    height: 26px;
    color: rgba(92, 217, 240, 0.5);
}

.price-checker-empty-state__title {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
    color: #e8f2ff;
}

.price-checker-empty-state__text {
    margin: 0;
    max-width: 380px;
    font-size: 0.9rem;
    line-height: 1.6;
    color: rgba(223, 235, 248, 0.6);
}

.price-checker-empty-state__hint {
    margin: 0;
    font-size: 0.82rem;
    color: rgba(223, 235, 248, 0.4);
}

/* ─── Override modal-specific styles for page mode ─────────────────────────── */
.price-checker-page__panel .price-check__actions {
    padding: 16px 24px;
    margin: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.price-checker-page__panel .price-check__disclaimer {
    padding: 14px 24px;
    margin: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* ─── Sidebar: popular patterns as 2-col grid ─────────────────────────────── */
.price-checker-sidebar .price-check__suggestion-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    overflow-x: visible;
    padding-bottom: 0;
}

.price-checker-sidebar .price-check__suggestion-chip {
    flex-shrink: 0;
    align-items: center;
    gap: 6px;
    padding: 4px 8px 4px 4px;
    border-radius: 10px;
    max-width: 100%;
    overflow: hidden;
}

.price-checker-sidebar .price-check__suggestion-thumb {
    width: 28px;
    height: 28px;
}

.price-checker-sidebar .price-check__suggestion-label {
    max-width: none;
    flex: 1;
    min-width: 0;
    font-size: 0.7rem;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.price-checker-sidebar .price-check__history-pattern {
    margin-left: 0;
    font-size: 0.68rem;
    flex-shrink: 0;
}

/* ─── Animated placeholder (typewriter cycling) ────────────────────────────── */
.price-check__input::placeholder {
    color: #475569;
}

@keyframes pc-placeholder-fade {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 0.2; }
}

.price-check__input[data-ph-animated]::placeholder {
    animation: pc-placeholder-fade 3s ease-in-out infinite;
}

/* ─── Desktop: side-by-side with independent scroll ────────────────────────── */
@media (min-width: 769px) {
    .price-checker-page__panel {
        max-height: 720px;
    }

    .price-checker-layout {
        flex-direction: row;
        min-height: 0;
        flex: 1;
    }

    .price-checker-sidebar {
        width: 300px;
        min-width: 300px;
        border-bottom: none;
        border-right: 1px solid rgba(255, 255, 255, 0.06);
        overflow-y: auto;
    }

    .price-checker-main-area {
        overflow-y: auto;
    }
}

@media (min-width: 1200px) {
    .price-checker-page__panel {
        max-height: 760px;
    }

    .price-checker-sidebar {
        width: 320px;
        min-width: 320px;
    }
}

/* ─── Ad slot wrapper ──────────────────────────────────────────────────────── */
.price-checker-page__ad {
    display: flex;
    justify-content: center;
}

/* ─── SEO content (FAQ + keywords + about) ─────────────────────────────────── */
.price-checker-seo {
    max-width: 820px;
    margin: 0 auto;
    padding: 8px 4px 0;
    color: rgba(223, 235, 248, 0.78);
    line-height: 1.7;
}

.price-checker-seo__title {
    margin: 0 0 16px;
    font-size: clamp(1.4rem, 3vw, 2rem);
    font-weight: 700;
    color: #f7fbff;
    letter-spacing: -0.01em;
}

.price-checker-seo__intro {
    margin: 0 0 28px;
    font-size: 1rem;
    color: rgba(223, 235, 248, 0.7);
}

.price-checker-seo__faq {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 36px;
}

.price-checker-seo__item {
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    background: rgba(15, 18, 28, 0.4);
    overflow: hidden;
    transition: border-color 0.2s ease;
}

.price-checker-seo__item[open] {
    border-color: rgba(92, 217, 240, 0.2);
}

.price-checker-seo__q {
    padding: 16px 20px;
    font-size: 0.98rem;
    font-weight: 600;
    color: #e8f2ff;
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    transition: background 0.15s ease;
}

.price-checker-seo__q::-webkit-details-marker {
    display: none;
}

.price-checker-seo__q::after {
    content: '+';
    flex-shrink: 0;
    font-size: 1.3rem;
    font-weight: 400;
    color: rgba(92, 217, 240, 0.6);
    transition: transform 0.2s ease;
}

.price-checker-seo__item[open] .price-checker-seo__q::after {
    content: '\2212';
    transform: rotate(180deg);
}

.price-checker-seo__q:hover {
    background: rgba(92, 217, 240, 0.04);
}

.price-checker-seo__a {
    padding: 0 20px 18px;
    font-size: 0.92rem;
    color: rgba(223, 235, 248, 0.72);
    line-height: 1.75;
}

.price-checker-seo__keywords {
    margin-bottom: 36px;
}

.price-checker-seo__keywords-title,
.price-checker-seo__about-title {
    margin: 0 0 14px;
    font-size: 1.1rem;
    font-weight: 700;
    color: #dceaff;
}

.price-checker-seo__keyword-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.price-checker-seo__keyword-list li {
    padding: 6px 14px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.025);
    font-size: 0.82rem;
    color: rgba(223, 235, 248, 0.65);
    font-weight: 500;
}

.price-checker-seo__about {
    margin-bottom: 8px;
}

.price-checker-seo__about p {
    margin: 0 0 14px;
    font-size: 0.92rem;
    color: rgba(223, 235, 248, 0.7);
    line-height: 1.75;
}

.price-checker-seo__about strong {
    color: #bfe9ff;
    font-weight: 600;
}

/* ─── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 1199px) {
    .price-checker-page__content {
        padding: 0 16px 56px;
    }
}

/* ─── Tablet (481-768px): stacked, sidebar on top, no popular patterns ─────── */
@media (max-width: 768px) {
    .price-checker-hero {
        padding: 40px 0 28px;
    }

    .price-checker-sidebar {
        padding: 20px;
    }

    /* Hide popular patterns on tablet/mobile — not enough space */
    .price-checker-sidebar .price-check__suggestions {
        display: none;
    }

    /* Hide the "pick from sidebar" hint since sidebar patterns are hidden */
    .price-checker-empty-state__hint--desktop {
        display: none;
    }

    .price-checker-main-area {
        padding: 20px;
        min-height: 320px;
    }

    .price-checker-page__panel .price-check__actions {
        padding: 14px 20px;
    }

    .price-checker-page__panel .price-check__disclaimer {
        padding: 12px 20px;
    }

    .price-checker-page__content {
        padding: 0 16px 56px;
        gap: 24px;
    }

    .price-checker-seo {
        padding: 8px 0 0;
    }

    .price-checker-seo__q {
        padding: 14px 16px;
        font-size: 0.92rem;
    }

    .price-checker-seo__a {
        padding: 0 16px 16px;
        font-size: 0.88rem;
    }

    .price-checker-empty-state {
        padding: 32px 16px;
    }
}

/* ─── Mobile (≤480px): compact ─────────────────────────────────────────────── */
@media (max-width: 480px) {
    .price-checker-sidebar {
        padding: 16px;
    }

    .price-checker-main-area {
        padding: 16px;
        min-height: 260px;
    }

    .price-checker-page__panel .price-check__actions {
        padding: 12px 16px;
        flex-wrap: wrap;
    }

    .price-checker-page__panel .price-check__disclaimer {
        padding: 10px 16px;
        font-size: 0.8rem;
    }

    .price-checker-empty-state {
        padding: 24px 12px;
    }

    .price-checker-empty-state__icon {
        width: 48px;
        height: 48px;
    }

    .price-checker-empty-state__title {
        font-size: 1.05rem;
    }

    .price-checker-empty-state__text {
        font-size: 0.85rem;
    }
}
