/* ============================================================
   PropertyPulse — Main Stylesheet
   Imports shared Pulse Design System + PropertyPulse-specific styles.
   Pulse Design System · Hand-crafted CSS · No frameworks
   Accent: Emerald (growth, value, property)
   ============================================================ */

/* === SHARED DESIGN SYSTEM === */
@import url('pulse-design-system/css/tokens/_brand-propertypulse.css');
@import url('pulse-design-system/css/pulse-core.css');

/* === PROPERTYPULSE-SPECIFIC TOKENS === */

:root {
    /* Legacy aliases (for existing templates referencing these directly) */
    --pulse-emerald: #10B981;
    --pulse-emerald-light: #34D399;
    --pulse-emerald-glow: rgba(16, 185, 129, 0.15);
    --pulse-emerald-glow-strong: rgba(16, 185, 129, 0.3);
    --pulse-white: #F8FAFC;

    /* PropertyPulse extras not in shared system */
    --bg-hero: #0F172A;
    --text-accent: #10B981;
    --border-focus: #10B981;
    --border-subtle: rgba(0, 0, 0, 0.06);
    --accent-active: #047857;
    --success-light: #D1FAE5;
    --transition-spring: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);
    --radius-2xl: 24px;
    --space-32: 8rem;

    /* EPC Colours (PropertyPulse-specific) */
    --epc-a: #008054;
    --epc-b: #19b459;
    --epc-c: #8dce46;
    --epc-d: #ffd500;
    --epc-e: #fcaa65;
    --epc-f: #ef8023;
    --epc-g: #e9153b;
}


/* ============================================================
   PropertyPulse-Specific Page Styles
   Styles below are unique to PropertyPulse and not shared.
   ============================================================ */

/* === PAGE-LEVEL PADDING === */

.page-content {
    padding-top: calc(var(--header-height) + var(--space-10));
    padding-bottom: var(--space-16);
    min-height: 60vh;
}

/* === FAQ SECTION (details/summary accordion overrides) === */

.faq-section {
    margin-top: var(--space-8);
}

.faq-item__question {
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    transition: color 0.2s ease;
}

.faq-item__question::-webkit-details-marker {
    display: none;
}

.faq-item__question::after {
    content: '+';
    flex-shrink: 0;
    font-size: var(--text-lg, 1.125rem);
    font-weight: 300;
    color: var(--text-tertiary, #64748B);
    transition: transform 0.2s ease;
}

.faq-item[open] .faq-item__question::after {
    content: '\2212';
}

.faq-item__question:hover {
    color: var(--text-accent, #10B981);
}


/* ============================================================
   FREEMIUM GATE — Registration Overlay
   Full content remains in DOM (SEO-safe). Overlay blocks humans.
   ============================================================ */

/* View counter badge — warns anon users near limit */
.view-counter {
    position: fixed;
    bottom: var(--space-6);
    left: 50%;
    transform: translateX(-50%);
    z-index: 900;
    animation: viewCounterSlide 0.4s ease-out;
}

@keyframes viewCounterSlide {
    from { opacity: 0; transform: translateX(-50%) translateY(20px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.view-counter__inner {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-5);
    background: var(--bg-card, #1E293B);
    border: 1px solid var(--border, rgba(255,255,255,0.08));
    border-radius: var(--radius-full, 9999px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    font-size: var(--text-sm, 0.875rem);
    color: var(--text-secondary, #94A3B8);
    backdrop-filter: blur(12px);
    white-space: nowrap;
}

.view-counter__inner svg {
    color: var(--warning, #F59E0B);
    flex-shrink: 0;
}

.view-counter__inner strong {
    color: var(--warning, #F59E0B);
    font-weight: 700;
}

.view-counter__link {
    color: var(--accent, #10B981);
    font-weight: 600;
    text-decoration: none;
    margin-left: var(--space-2);
}

.view-counter__link:hover {
    text-decoration: underline;
}

/* Registration gate overlay */
.reg-gate {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: regGateFade 0.3s ease-out;
}

@keyframes regGateFade {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.reg-gate__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(8px);
}

.reg-gate__panel {
    position: relative;
    max-width: 480px;
    width: calc(100% - var(--space-8));
    background: var(--bg-card, #1E293B);
    border: 1px solid var(--border, rgba(255,255,255,0.08));
    border-radius: var(--radius-2xl, 24px);
    padding: var(--space-10) var(--space-8);
    text-align: center;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.4);
    animation: regGatePanel 0.4s ease-out;
}

@keyframes regGatePanel {
    from { opacity: 0; transform: translateY(24px) scale(0.96); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.reg-gate__icon {
    margin-bottom: var(--space-4);
    color: var(--accent, #10B981);
}

.reg-gate__title {
    font-size: var(--text-xl, 1.25rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text-primary, #F8FAFC);
    margin-bottom: var(--space-3);
}

.reg-gate__subtitle {
    font-size: var(--text-sm, 0.875rem);
    color: var(--text-secondary, #94A3B8);
    line-height: 1.6;
    margin-bottom: var(--space-6);
}

.reg-gate__features {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    text-align: left;
    margin-bottom: var(--space-8);
}

.reg-gate__feature {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    font-size: var(--text-sm, 0.875rem);
    color: var(--text-primary, #F8FAFC);
}

.reg-gate__feature svg {
    color: var(--accent, #10B981);
    flex-shrink: 0;
}

.reg-gate__actions {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    margin-bottom: var(--space-6);
}

.reg-gate__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-6);
    border-radius: var(--radius-lg, 12px);
    font-size: var(--text-sm, 0.875rem);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
}

.reg-gate__btn--primary {
    background: var(--accent, #10B981);
    color: #fff;
}

.reg-gate__btn--primary:hover {
    background: var(--accent-active, #047857);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.3);
}

.reg-gate__btn--secondary {
    background: transparent;
    color: var(--text-secondary, #94A3B8);
    border: 1px solid var(--border, rgba(255,255,255,0.08));
}

.reg-gate__btn--secondary:hover {
    color: var(--text-primary, #F8FAFC);
    border-color: var(--text-tertiary, #64748B);
}

.reg-gate__note {
    font-size: var(--text-xs, 0.75rem);
    color: var(--text-tertiary, #64748B);
    line-height: 1.5;
}

/* When gate is active, blur page content behind it */
body.is-gated .prop-grid,
body.is-gated .street-content,
body.is-gated .postcode-content,
body.is-gated .town-content {
    filter: blur(6px);
    pointer-events: none;
    user-select: none;
}

/* Premium feature upsell card */
.premium-upsell {
    padding: var(--space-6);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(16, 185, 129, 0.02));
    border: 1px dashed rgba(16, 185, 129, 0.3);
    border-radius: var(--radius-xl, 16px);
    text-align: center;
}

.premium-upsell__title {
    font-size: var(--text-base, 1rem);
    font-weight: 700;
    color: var(--accent, #10B981);
    margin-bottom: var(--space-2);
}

.premium-upsell__text {
    font-size: var(--text-sm, 0.875rem);
    color: var(--text-secondary, #94A3B8);
    line-height: 1.6;
    margin-bottom: var(--space-4);
}

.premium-upsell__btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-5);
    background: var(--accent, #10B981);
    color: #fff;
    border-radius: var(--radius-lg, 12px);
    font-size: var(--text-sm, 0.875rem);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.premium-upsell__btn:hover {
    background: var(--accent-active, #047857);
}

@media (max-width: 640px) {
    .view-counter__inner {
        flex-wrap: wrap;
        justify-content: center;
        text-align: center;
        white-space: normal;
        gap: var(--space-2);
    }
    .reg-gate__panel {
        padding: var(--space-8) var(--space-6);
    }
}
