/* ============================================================
   FengHe Disclosure Popup — Public Styles
   Minimalist, institutional. Inspired by Brevan Howard.
   ============================================================ */

/* ── Variables ─────────────────────────────────────────────── */
:root {
    --fenghe-accent:       #0C436A;
    --fenghe-accent-dark:  #093655;
    --fenghe-bg:           #ffffff;
    --fenghe-footer-bg:    #f5f3ef;
    --fenghe-text:         #1a2332;
    --fenghe-text-muted:   #6b7280;
    --fenghe-border:       #e5e0d8;
    --fenghe-font-serif:   'Georgia', 'Times New Roman', serif;
    --fenghe-font-sans:    -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --fenghe-radius:       0px;
    --fenghe-modal-w:      680px;
    --fenghe-content-h:    340px;
}

/* ── Overlay ───────────────────────────────────────────────── */
#fenghe-disclosure-overlay {
    position:        fixed;
    inset:           0;
    z-index:         999999;
    display:         flex;
    align-items:     center;
    justify-content: center;
    background:      rgba(10, 20, 35, 0.55);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    animation:       fenghe-fade-in 0.35s ease forwards;
}

@keyframes fenghe-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* ── Modal ─────────────────────────────────────────────────── */
#fenghe-disclosure-modal {
    width:          var(--fenghe-modal-w);
    max-width:      calc(100vw - 48px);
    background:     var(--fenghe-bg);
    display:        flex;
    flex-direction: column;
    box-shadow:     0 24px 80px rgba(10, 20, 35, 0.28);
    animation:      fenghe-slide-up 0.38s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes fenghe-slide-up {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Scrollable content body ───────────────────────────────── */
#fenghe-disclosure-body {
    height:             var(--fenghe-content-h);
    overflow-y:         scroll;
    padding:            40px 48px 32px;
    overscroll-behavior: contain;
    border-right:       3px solid var(--fenghe-border);
    box-sizing:         border-box;

    /* Custom minimal scrollbar */
    scrollbar-width: thin;
    scrollbar-color: var(--fenghe-accent) transparent;
}

#fenghe-disclosure-body::-webkit-scrollbar       { width: 4px; }
#fenghe-disclosure-body::-webkit-scrollbar-track  { background: transparent; }
#fenghe-disclosure-body::-webkit-scrollbar-thumb  {
    background:    var(--fenghe-accent);
    border-radius: 2px;
}

/* ── Content Typography ────────────────────────────────────── */
#fenghe-disclosure-content {
    color:       var(--fenghe-text);
    font-family: var(--fenghe-font-sans);
    font-size:   13px;
    line-height: 1.75;
}

#fenghe-disclosure-content h1,
#fenghe-disclosure-content h2,
#fenghe-disclosure-content h3 {
    font-family:   var(--fenghe-font-serif);
    font-weight:   400;
    color:         var(--fenghe-text);
    margin-top:    0;
    margin-bottom: 20px;
    line-height:   1.2;
}

#fenghe-disclosure-content h1 { font-size: 28px; }
#fenghe-disclosure-content h2 { font-size: 22px; }
#fenghe-disclosure-content h3 { font-size: 17px; }

#fenghe-disclosure-content p {
    margin:    0 0 16px;
    font-size: 13px;
}
#fenghe-disclosure-content p:last-child { margin-bottom: 0; }
#fenghe-disclosure-content a {
    color:           var(--fenghe-accent);
    text-decoration: underline;
}

/* ── Footer strip ──────────────────────────────────────────── */
#fenghe-disclosure-footer {
    background: var(--fenghe-footer-bg);
    padding:    28px 48px 32px;
    border-top: 1px solid var(--fenghe-border);
}

/* ── Actions ───────────────────────────────────────────────── */
#fenghe-disclosure-actions {
    display:       flex;
    align-items:   center;
    gap:           24px;
    margin-bottom: 20px;
}

#fenghe-btn-accept {
    display:         inline-flex;
    align-items:     center;
    justify-content: center;
    padding:         12px 32px;
    background:      var(--fenghe-accent);
    color:           #ffffff;
    font-family:     var(--fenghe-font-sans);
    font-size:       13px;
    font-weight:     600;
    letter-spacing:  0.04em;
    text-transform:  uppercase;
    border:          none;
    cursor:          pointer;
    transition:      background 0.18s ease;
    white-space:     nowrap;
}
#fenghe-btn-accept:hover       { background: var(--fenghe-accent-dark); }
#fenghe-btn-accept:focus-visible {
    outline:        3px solid var(--fenghe-accent);
    outline-offset: 3px;
}

#fenghe-btn-decline {
    background:      none;
    border:          none;
    padding:         0;
    color:           var(--fenghe-text-muted);
    font-family:     var(--fenghe-font-sans);
    font-size:       13px;
    cursor:          pointer;
    text-decoration: underline;
    transition:      color 0.18s ease;
    white-space:     nowrap;
}
#fenghe-btn-decline:hover { color: var(--fenghe-text); }

/* ── Acceptance note ───────────────────────────────────────── */
#fenghe-disclosure-note {
    font-family: var(--fenghe-font-sans);
    font-size:   11.5px;
    color:       var(--fenghe-text-muted);
    margin:      0;
    line-height: 1.5;
}

/* ── Decline view ──────────────────────────────────────────── */
#fenghe-disclosure-modal.fenghe-declined #fenghe-disclosure-body {
    height:       auto;
    max-height:   420px;
    border-right: none;
}
#fenghe-disclosure-modal.fenghe-declined #fenghe-disclosure-footer {
    display: none;
}

.fenghe-decline-nav    { display: flex; align-items: center; gap: 6px; margin-bottom: 28px; }
.fenghe-decline-back   {
    background: none; border: none; padding: 0;
    color: var(--fenghe-accent); font-family: var(--fenghe-font-sans); font-size: 13px;
    cursor: pointer; text-decoration: underline;
    display: flex; align-items: center; gap: 4px;
}
.fenghe-decline-back:hover { text-decoration: none; }

/* ── Responsive ────────────────────────────────────────────── */
@media ( max-width: 720px ) {
    :root {
        --fenghe-modal-w:   100vw;
        --fenghe-content-h: 260px;
    }
    #fenghe-disclosure-modal  { max-width: 100%; margin: 0; align-self: flex-end; }
    #fenghe-disclosure-body,
    #fenghe-disclosure-footer { padding-left: 24px; padding-right: 24px; }
    #fenghe-disclosure-actions { flex-direction: column; align-items: flex-start; gap: 16px; }
}
