/* ============================================================
   UL AI Hub — Legal Documents Page CSS
   Handles: visitor teaser, 3-path gate, member history, modal
   ============================================================ */

/* ── Wrap ────────────────────────────────────────────────── */
.ul-ldp-wrap {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 0 48px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ── VISITOR: Hero ───────────────────────────────────────── */
.ul-ldp-hero {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 40px;
    align-items: center;
    padding: 32px 0 40px;
    border-bottom: 2px solid #AADDFF;
    margin-bottom: 40px;
}
.ul-ldp-hero__eyebrow {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #1a6eb5;
    display: block;
    margin-bottom: 10px;
}
.ul-ldp-hero__title {
    font-size: 30px;
    font-weight: 800;
    color: #0f1f3d;
    line-height: 1.2;
    margin: 0 0 14px;
}
.ul-ldp-hero__sub {
    font-size: 14px;
    color: #475569;
    line-height: 1.7;
    margin-bottom: 20px;
    max-width: 500px;
}
.ul-ldp-hero__stats {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}
.ul-ldp-hero__stat {
    font-size: 12px;
    color: #475569;
}
.ul-ldp-hero__stat strong {
    display: block;
    font-size: 20px;
    color: #1a6eb5;
    font-weight: 800;
}

/* Sample doc preview */
.ul-ldp-sample-doc {
    background: #fff;
    border: 1px solid #AADDFF;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(15,31,61,0.12);
    overflow: hidden;
}
.ul-ldp-sample-doc__header {
    background: #0f1f3d;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.ul-ldp-sample-doc__label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #c9973a;
}
.ul-ldp-sample-doc__state {
    background: #1a6eb5;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 3px;
}
.ul-ldp-sample-doc__body { padding: 16px; position: relative; }
.ul-ldp-sample-doc__notice {
    font-size: 9px;
    color: #94a3b8;
    background: #F5FBFF;
    border: 1px solid #AADDFF;
    padding: 6px 10px;
    margin-bottom: 12px;
    border-radius: 3px;
    line-height: 1.5;
}
.ul-ldp-sample-doc__title {
    font-size: 12px;
    font-weight: 700;
    text-align: center;
    color: #0f1f3d;
    margin-bottom: 10px;
    text-transform: uppercase;
}
.ul-ldp-sample-doc__text {
    font-family: Georgia, serif;
    font-size: 12px;
    line-height: 1.7;
    color: #1a1a1a;
    max-height: 110px;
    overflow: hidden;
    position: relative;
}
.ul-ldp-sample-doc__footer { position: relative; margin-top: 0; }
.ul-ldp-sample-doc__blur-overlay {
    display: block;
    background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,0.95) 40%, #fff);
    padding: 40px 16px 14px;
    text-align: center;
    font-size: 12px;
    font-weight: 700;
    color: #1a6eb5;
    margin-top: -40px;
}

/* ── VISITOR: Doc catalog teaser ─────────────────────────── */
.ul-ldp-section-title {
    font-size: 20px;
    font-weight: 700;
    color: #0f1f3d;
    margin: 0 0 20px;
}
.ul-ldp-doc-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 40px;
}
.ul-ldp-doc-card {
    background: #fff;
    border: 1px solid #AADDFF;
    border-radius: 8px;
    padding: 16px;
    position: relative;
    transition: box-shadow 0.15s, transform 0.15s;
}
.ul-ldp-doc-card:hover {
    box-shadow: 0 4px 20px rgba(15,31,61,0.12);
    transform: translateY(-2px);
}
.ul-ldp-doc-card.featured {
    background: #FFF8ED;
    border-color: rgba(201,151,58,0.4);
    border-width: 2px;
}
.ul-ldp-doc-card__badge {
    position: absolute;
    top: -9px;
    left: 50%;
    transform: translateX(-50%);
    background: #c9973a;
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 2px 10px;
    border-radius: 99px;
    white-space: nowrap;
}
.ul-ldp-doc-card__icon { font-size: 22px; display: block; margin-bottom: 8px; }
.ul-ldp-doc-card__title {
    font-size: 13px;
    font-weight: 700;
    color: #0f1f3d;
    margin-bottom: 6px;
}
.ul-ldp-doc-card__desc {
    font-size: 11px;
    color: #64748b;
    line-height: 1.5;
    margin-bottom: 12px;
}
.ul-ldp-doc-card__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 4px;
    border-top: 1px solid #AADDFF;
    padding-top: 8px;
    margin-top: auto;
}
.ul-ldp-doc-card__complexity {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 2px 7px;
    border-radius: 3px;
}
.ul-ldp-cx--green  { background: #dcfce7; color: #166534; }
.ul-ldp-cx--blue   { background: #EDF6FF; color: #1a6eb5; }
.ul-ldp-cx--gold   { background: #FFF8ED; color: #8a6500; }
.ul-ldp-cx--navy   { background: #e0e7f5; color: #0f1f3d; }
.ul-ldp-doc-card__pricing { text-align: right; }
.ul-ldp-doc-card__price { font-size: 13px; font-weight: 700; color: #1a6eb5; display: block; }
.ul-ldp-doc-card__retail { font-size: 10px; color: #94a3b8; text-decoration: line-through; }
.ul-ldp-doc-card.featured .ul-ldp-doc-card__price { color: #c9973a; }

/* ── VISITOR: Comparison strip ───────────────────────────── */
.ul-ldp-compare {
    display: flex;
    align-items: center;
    gap: 20px;
    background: #F5FBFF;
    border: 1px solid #AADDFF;
    border-radius: 8px;
    padding: 20px 28px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}
.ul-ldp-compare__item { flex: 1; min-width: 200px; }
.ul-ldp-compare__item--them { opacity: 0.6; }
.ul-ldp-compare__label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #94a3b8;
    margin-bottom: 4px;
}
.ul-ldp-compare__item--us .ul-ldp-compare__label { color: #1a6eb5; }
.ul-ldp-compare__price {
    font-size: 22px;
    font-weight: 800;
    color: #0f1f3d;
    margin-bottom: 4px;
}
.ul-ldp-compare__item--them .ul-ldp-compare__price { text-decoration: line-through; color: #94a3b8; }
.ul-ldp-compare__item--us .ul-ldp-compare__price { color: #166534; }
.ul-ldp-compare__price span { font-size: 13px; font-weight: 400; color: #64748b; }
.ul-ldp-compare__notes { font-size: 12px; color: #64748b; }
.ul-ldp-compare__vs {
    font-size: 14px;
    font-weight: 700;
    color: #94a3b8;
    flex-shrink: 0;
}

/* ── VISITOR: 3-path gate ────────────────────────────────── */
.ul-ldp-gate {
    background: #fff;
    border: 2px solid #0f1f3d;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 12px 48px rgba(15,31,61,0.15);
    margin-bottom: 32px;
}
.ul-ldp-gate__top {
    background: #0f1f3d;
    padding: 28px 32px 22px;
    text-align: center;
}
.ul-ldp-gate__icon { font-size: 28px; display: block; margin-bottom: 8px; }
.ul-ldp-gate__title { font-size: 20px; font-weight: 700; color: #fff; margin: 0 0 6px; }
.ul-ldp-gate__sub { font-size: 13px; color: rgba(255,255,255,0.55); max-width: 520px; margin: 0 auto; }

.ul-ldp-gate__paths {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    position: relative;
}
.ul-ldp-gate__divider {
    display: none; /* hidden at 3-col, shown on mobile */
}
.ul-ldp-gate__path {
    padding: 24px 22px 28px;
    border-right: 1px solid #AADDFF;
    background: #F5FBFF;
    text-align: center;
}
.ul-ldp-gate__path:last-child { border-right: none; }
.ul-ldp-gate__path--premium { background: #EDF6FF; }
.ul-ldp-gate__path--combo   { background: #FFF8ED; }

.ul-ldp-gate__path-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 3px 10px;
    border-radius: 99px;
    margin-bottom: 10px;
}
.ul-ldp-gate__path-badge--free    { background: #EDF6FF; color: #1a6eb5; }
.ul-ldp-gate__path-badge--premium { background: #dbeafe; color: #1a6eb5; }
.ul-ldp-gate__path-badge--combo   { background: rgba(201,151,58,0.2); color: #8a6500; }

.ul-ldp-gate__path-plan {
    font-size: 16px;
    font-weight: 700;
    color: #0f1f3d;
    margin-bottom: 14px;
}
.ul-ldp-gate__features {
    list-style: none;
    text-align: left;
    margin-bottom: 18px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.ul-ldp-gate__features li {
    font-size: 12px;
    color: #475569;
    padding-left: 18px;
    position: relative;
}
.ul-ldp-gate__features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #166534;
    font-weight: 700;
    font-size: 11px;
}
.ul-ldp-gate__btn {
    display: block;
    padding: 10px 16px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    transition: all 0.15s;
}
.ul-ldp-gate__btn--free    { background: #0f1f3d; color: #fff; }
.ul-ldp-gate__btn--free:hover { background: #1a3260; color: #fff; }
.ul-ldp-gate__btn--premium { background: #1a6eb5; color: #fff; }
.ul-ldp-gate__btn--premium:hover { background: #0d4a82; color: #fff; }
.ul-ldp-gate__btn--combo   { background: #c9973a; color: #fff; }
.ul-ldp-gate__btn--combo:hover { background: #b8862a; color: #fff; }

.ul-ldp-gate__login {
    padding: 14px 32px;
    border-top: 1px solid #AADDFF;
    background: #F5FBFF;
    text-align: center;
    font-size: 13px;
    color: #64748b;
}
.ul-ldp-gate__login a { color: #1a6eb5; font-weight: 600; text-decoration: none; }
.ul-ldp-gate__login a:hover { text-decoration: underline; }

/* ── MEMBER: Header ──────────────────────────────────────── */
.ul-ldp-member-header {
    padding-bottom: 20px;
    border-bottom: 2px solid #AADDFF;
    margin-bottom: 28px;
}
.ul-ldp-member-header__title {
    font-size: 22px;
    font-weight: 700;
    color: #0f1f3d;
    margin: 0 0 6px;
}
.ul-ldp-member-header__sub {
    font-size: 13px;
    color: #475569;
    margin: 0;
}

/* ── MEMBER: History ─────────────────────────────────────── */
.ul-ldp-history {
    margin-top: 40px;
    border-top: 2px solid #AADDFF;
    padding-top: 28px;
}
.ul-ldp-history__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}
.ul-ldp-history__title {
    font-size: 18px;
    font-weight: 700;
    color: #0f1f3d;
    margin: 0;
}
.ul-ldp-history__count {
    font-size: 12px;
    color: #94a3b8;
}
.ul-ldp-history__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}
.ul-ldp-history__card {
    background: #fff;
    border: 1px solid #AADDFF;
    border-radius: 7px;
    overflow: hidden;
    transition: box-shadow 0.15s;
}
.ul-ldp-history__card:hover { box-shadow: 0 3px 14px rgba(15,31,61,0.10); }
.ul-ldp-history__card.loading { opacity: 0.6; pointer-events: none; }

.ul-ldp-history__card-head {
    padding: 12px 14px;
    display: flex;
    gap: 10px;
    align-items: flex-start;
    border-bottom: 1px solid #AADDFF;
}
.ul-ldp-history__card-icon { font-size: 18px; flex-shrink: 0; }
.ul-ldp-history__card-info { flex: 1; min-width: 0; }
.ul-ldp-history__card-title {
    font-size: 12px;
    font-weight: 600;
    color: #0f1f3d;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ul-ldp-history__card-meta {
    font-size: 11px;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 2px;
}
.ul-ldp-history__card-state {
    background: #1a6eb5;
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 2px;
}
.ul-ldp-history__card-actions {
    padding: 8px 14px;
    display: flex;
    gap: 8px;
    background: #F5FBFF;
}
.ul-ldp-history__btn {
    flex: 1;
    background: #fff;
    border: 1px solid #AADDFF;
    border-radius: 4px;
    padding: 5px 8px;
    font-size: 11px;
    font-weight: 600;
    color: #0f1f3d;
    cursor: pointer;
    transition: all 0.15s;
    font-family: inherit;
    text-align: center;
}
.ul-ldp-history__btn:hover { background: #EDF6FF; border-color: #1a6eb5; }
.ul-ldp-history__btn--dl { background: #1a6eb5; border-color: #1a6eb5; color: #fff; }
.ul-ldp-history__btn--dl:hover { background: #0d4a82; }

/* ── Modal ───────────────────────────────────────────────── */
.ul-ldp-modal {
    position: fixed;
    inset: 0;
    background: rgba(15,31,61,0.7);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.ul-ldp-modal__inner {
    background: #fff;
    border-radius: 8px;
    width: 100%;
    max-width: 760px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.ul-ldp-modal__bar {
    background: #0f1f3d;
    padding: 12px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}
.ul-ldp-modal__title { font-size: 13px; font-weight: 600; color: #fff; flex: 1; }
.ul-ldp-modal__actions { display: flex; gap: 8px; }
.ul-ldp-modal__btn {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff;
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s;
}
.ul-ldp-modal__btn:hover { background: rgba(255,255,255,0.2); }
.ul-ldp-modal__btn--dl { background: #1a6eb5; border-color: #1a6eb5; }
.ul-ldp-modal__body {
    padding: 28px 32px;
    overflow-y: auto;
    flex: 1;
}
body.ul-ldp-modal-open { overflow: hidden; }

/* ── Print ───────────────────────────────────────────────── */
@media print {
    .ul-ldp-wrap > *:not(.ul-ldp-modal) { display: none !important; }
    .ul-ldp-modal { position: static !important; background: none !important; padding: 0 !important; }
    .ul-ldp-modal__inner { max-height: none !important; box-shadow: none !important; }
    .ul-ldp-modal__bar { display: none !important; }
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 960px) {
    .ul-ldp-doc-grid { grid-template-columns: repeat(2, 1fr); }
    .ul-ldp-history__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 700px) {
    .ul-ldp-hero { grid-template-columns: 1fr; }
    .ul-ldp-hero__right { display: none; }
    .ul-ldp-doc-grid { grid-template-columns: 1fr 1fr; }
    .ul-ldp-gate__paths { grid-template-columns: 1fr; }
    .ul-ldp-history__grid { grid-template-columns: 1fr; }
    .ul-ldp-compare { flex-direction: column; }
}

/* ── Inline registration form ────────────────────────────── */
.ul-ldp-reg-form { margin-top: 14px; }
.ul-ldp-reg-form__field { margin-bottom: 8px; }
.ul-ldp-reg-input {
    width: 100%;
    border: 1px solid #AADDFF;
    border-radius: 4px;
    padding: 8px 11px;
    font-size: 13px;
    color: #0f1f3d;
    background: #fff;
    outline: none;
    box-sizing: border-box;
    font-family: inherit;
    transition: border-color 0.15s;
}
.ul-ldp-reg-input:focus {
    border-color: #1a6eb5;
    box-shadow: 0 0 0 2px rgba(26,110,181,0.1);
}
.ul-ldp-reg-form__error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
    font-size: 12px;
    padding: 8px 11px;
    border-radius: 4px;
    margin-bottom: 8px;
    line-height: 1.5;
}
.ul-ldp-reg-form__error a { color: #1a6eb5; }
.ul-ldp-reg-form__terms {
    font-size: 10px;
    color: #94a3b8;
    text-align: center;
    margin-top: 8px;
    line-height: 1.5;
}
.ul-ldp-reg-form__terms a { color: #1a6eb5; }

.ul-ldp-reg-success {
    text-align: center;
    padding: 20px 0;
}
.ul-ldp-reg-success__icon { font-size: 28px; display: block; margin-bottom: 8px; }
.ul-ldp-reg-success strong { font-size: 15px; color: #166534; display: block; margin-bottom: 4px; }
.ul-ldp-reg-success p { font-size: 12px; color: #64748b; }

/* Updated gate path price display */
.ul-ldp-gate__path-price {
    margin-bottom: 12px;
    text-align: center;
}
.ul-ldp-gate__price-amount {
    font-size: 26px;
    font-weight: 800;
    color: #0f1f3d;
    display: block;
}
.ul-ldp-gate__path--premium .ul-ldp-gate__price-amount { color: #1a6eb5; }
.ul-ldp-gate__path--combo   .ul-ldp-gate__price-amount { color: #c9973a; }
.ul-ldp-gate__price-sub {
    font-size: 11px;
    color: #64748b;
}

/* Checkout redirect note */
.ul-ldp-gate__path-note {
    font-size: 10px;
    color: #94a3b8;
    text-align: center;
    margin-top: 10px;
    line-height: 1.5;
}
