/* ZoneLens Locked Field Component — ZL-LNYC-082
 * Styles for blurred/locked fields with upgrade CTAs.
 * Color palette matches the site: indigo (#4F46E5) accent, green (#10B981) for free CTA.
 */

/* Container */
.zl-locked-field {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid #E5E7EB;
}

.zl-locked-field:last-child {
    border-bottom: none;
}

/* Label — always visible */
.zl-locked-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #6B7280;
    min-width: 120px;
    flex-shrink: 0;
}

/* Blurred placeholder value */
.zl-blur-value {
    filter: blur(8px);
    user-select: none;
    -webkit-user-select: none;
    pointer-events: none;
    font-size: 0.9375rem;
    font-weight: 500;
    color: #374151;
    padding: 0.125rem 0.25rem;
    white-space: nowrap;
}

/* Lock icon */
.zl-lock-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    cursor: help;
    color: #9CA3AF;
    font-size: 0.75rem;
    position: relative;
}

.zl-lock-icon svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

/* Tooltip on hover */
.zl-lock-icon .zl-tooltip {
    display: none;
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: #111827;
    color: white;
    font-size: 0.6875rem;
    font-weight: 500;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    white-space: nowrap;
    z-index: 50;
    pointer-events: none;
}

.zl-lock-icon .zl-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 4px solid transparent;
    border-top-color: #111827;
}

.zl-lock-icon:hover .zl-tooltip {
    display: block;
}

/* Upgrade badge — pill shape, indigo accent */
.zl-upgrade-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: #4F46E5;
    color: white;
    font-size: 0.6875rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.2s, transform 0.1s;
    cursor: pointer;
    flex-shrink: 0;
    letter-spacing: 0.01em;
}

.zl-upgrade-badge:hover {
    background: #4338CA;
    transform: translateY(-1px);
}

.zl-upgrade-badge:active {
    transform: translateY(0);
}

/* Signup badge — green accent for free tier */
.zl-signup-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: #059669;
    color: white;
    font-size: 0.6875rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.2s, transform 0.1s;
    cursor: pointer;
    flex-shrink: 0;
    letter-spacing: 0.01em;
}

.zl-signup-badge:hover {
    background: #047857;
    transform: translateY(-1px);
}

.zl-signup-badge:active {
    transform: translateY(0);
}

/* Section-level upgrade banner (>50% locked) */
.zl-section-upgrade-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    background: linear-gradient(135deg, #EEF2FF 0%, #E0E7FF 100%);
    border: 1px solid #C7D2FE;
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    margin: 0.75rem 0;
}

.zl-section-upgrade-banner .zl-banner-text {
    font-size: 0.8125rem;
    color: #3730A3;
    font-weight: 500;
}

.zl-section-upgrade-banner .zl-banner-text strong {
    font-weight: 700;
}

.zl-section-upgrade-banner .zl-upgrade-badge {
    font-size: 0.75rem;
    padding: 0.375rem 1rem;
}

/* Sticky bottom upgrade bar */
.zl-sticky-upgrade-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    background: #1E1B4B;
    color: white;
    padding: 0.75rem 1.5rem;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.15);
    animation: zlSlideUp 0.3s ease-out;
}

@keyframes zlSlideUp {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
}

.zl-sticky-upgrade-bar .zl-bar-text {
    font-size: 0.875rem;
    font-weight: 500;
}

.zl-sticky-upgrade-bar .zl-upgrade-badge {
    background: white;
    color: #4F46E5;
    font-size: 0.8125rem;
    padding: 0.5rem 1.25rem;
}

.zl-sticky-upgrade-bar .zl-upgrade-badge:hover {
    background: #F5F3FF;
}

.zl-sticky-upgrade-bar .zl-bar-close {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #A5B4FC;
    font-size: 1.125rem;
    cursor: pointer;
    padding: 0.25rem;
    line-height: 1;
}

.zl-sticky-upgrade-bar .zl-bar-close:hover {
    color: white;
}

/* ── Report Viewer — ZL-LNYC-084 ──────────────────────────────────────────── */

/* Report field (visible) */
.zl-report-field {
    padding: 0.625rem 0;
    border-bottom: 1px solid #E5E7EB;
}

.zl-report-field:last-child {
    border-bottom: none;
}

.zl-report-field-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: #6B7280;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 0.25rem;
}

.zl-report-field-value {
    font-size: 0.9375rem;
    font-weight: 500;
    color: #111827;
}

.zl-report-field-empty {
    color: #9CA3AF;
}

.zl-report-field-nested {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.25rem 1rem;
}

.zl-report-subfield {
    font-size: 0.8125rem;
    color: #374151;
}

.zl-report-subfield-label {
    font-weight: 600;
    color: #6B7280;
}

.zl-report-subfield-value {
    font-weight: 500;
}

/* Report title */
.zl-report-title {
    font-size: 1.375rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #E5E7EB;
}

/* Preview section — normal rendering */
.zl-report-preview-section {
    margin-bottom: 0;
}

/* Locked section — extra blur overlay for grouped locked fields */
.zl-report-locked-section {
    position: relative;
    opacity: 0.6;
}

/* Report Unlock Banner — prominent CTA between preview and locked content */
.zl-report-unlock-banner {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    background: linear-gradient(135deg, #312E81 0%, #4338CA 50%, #4F46E5 100%);
    color: white;
    border-radius: 0.75rem;
    padding: 1.25rem 1.5rem;
    margin: 1.5rem 0;
    box-shadow: 0 4px 16px rgba(79, 70, 229, 0.25);
}

.zl-rub-icon {
    flex-shrink: 0;
    color: #C7D2FE;
}

.zl-rub-text {
    flex: 1;
    min-width: 0;
}

.zl-rub-title {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.zl-rub-subtitle {
    font-size: 0.8125rem;
    color: #C7D2FE;
    font-weight: 400;
}

.zl-rub-ctas {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex-shrink: 0;
}

.zl-rub-cta-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: white;
    color: #4F46E5;
    font-size: 0.875rem;
    font-weight: 700;
    padding: 0.625rem 1.25rem;
    border-radius: 0.5rem;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.2s, transform 0.1s;
    cursor: pointer;
}

.zl-rub-cta-primary:hover {
    background: #EEF2FF;
    transform: translateY(-1px);
}

.zl-rub-cta-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: #C7D2FE;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.375rem 0.75rem;
    border: 1px solid rgba(199, 210, 254, 0.3);
    border-radius: 0.375rem;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.2s, border-color 0.2s;
    cursor: pointer;
    text-align: center;
}

.zl-rub-cta-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(199, 210, 254, 0.6);
}

/* Responsive — stack badge below on small screens */
@media (max-width: 640px) {
    .zl-locked-field {
        flex-wrap: wrap;
        gap: 0.25rem;
    }

    .zl-locked-label {
        min-width: 100%;
        margin-bottom: 0.125rem;
    }

    .zl-upgrade-badge,
    .zl-signup-badge {
        margin-top: 0.25rem;
    }

    .zl-section-upgrade-banner {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }

    .zl-sticky-upgrade-bar {
        flex-direction: column;
        gap: 0.5rem;
        padding: 0.75rem 1rem;
        padding-right: 2.5rem;
    }

    .zl-report-unlock-banner {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
        padding: 1rem;
    }

    .zl-rub-ctas {
        width: 100%;
        align-items: stretch;
    }

    .zl-report-field-nested {
        grid-template-columns: 1fr;
    }
}
