/* =============================================================================
   FYSH — Credit Guide and Pricing modal
   CR: fysh-credit-guide-2026-09-26

   Frosted overlay, branded to the FYSH palette (navy #0F2340, gold #C9A84C,
   blue #1E5BA8). Self-contained hex values so it renders on public pages that
   do not load the workbench tokens. Content cards use the 4px radius standard.
   ============================================================================= */

.cg-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(15, 35, 64, 0.55);
    -webkit-backdrop-filter: blur(12px) saturate(1.3);
    backdrop-filter: blur(12px) saturate(1.3);
    animation: cg-fade 0.22s ease;
}
.cg-overlay.is-hidden { display: none; }
@keyframes cg-fade { from { opacity: 0; } to { opacity: 1; } }

.cg {
    width: 100%;
    max-width: 820px;
    max-height: calc(100vh - 48px);
    background: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 10px;
    box-shadow: 0 24px 64px rgba(15, 35, 64, 0.30);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: cg-rise 0.28s cubic-bezier(.16, 1, .3, 1);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}
@keyframes cg-rise {
    from { opacity: 0; transform: translateY(18px) scale(.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Header */
.cg__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 22px 24px 16px;
    border-bottom: 1px solid #EEF1F4;
    flex-shrink: 0;
}
.cg__titles { flex: 1; min-width: 0; }
.cg__eyebrow {
    font-size: 10px; font-weight: 700; text-transform: uppercase;
    letter-spacing: .12em; color: #C9A84C; margin-bottom: 4px;
}
.cg__title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(20px, 3vw, 26px); font-weight: 700;
    color: #0F2340; line-height: 1.2; margin: 0 0 8px;
}
.cg__subtitle {
    font-size: 14px; color: #6B7A8D; line-height: 1.6;
    max-width: 580px; margin: 0;
}
.cg__close {
    background: #EEF1F4; border: none; color: #6B7A8D;
    width: 34px; height: 34px; border-radius: 50%;
    cursor: pointer; font-size: 18px; line-height: 1;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; margin-left: 16px; transition: background .15s, color .15s;
}
.cg__close:hover { background: #E2E8F0; color: #0F2340; }

/* Body */
.cg__body { flex: 1; overflow-y: auto; padding: 20px 24px; }
.cg__section { margin-bottom: 22px; }
.cg__section:last-child { margin-bottom: 4px; }
.cg__section-title {
    font-size: 10px; font-weight: 700; text-transform: uppercase;
    letter-spacing: .09em; color: #1E5BA8; margin: 0 0 12px;
}

/* How it works */
.cg__how { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.cg__how-step {
    background: #F9FAFC; border: 1px solid #EEF1F4; border-radius: 4px;
    padding: 14px; display: flex; flex-direction: column; gap: 8px;
}
.cg__how-num {
    width: 24px; height: 24px; border-radius: 50%;
    background: #0F2340; color: #fff; font-size: 12px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
}
.cg__how-label { font-size: 14px; font-weight: 600; color: #0F2340; line-height: 1.3; }
.cg__how-desc { font-size: 12px; color: #6B7A8D; line-height: 1.6; }

/* Bundles */
.cg__bundles {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px;
}
.cg__bundle {
    background: #fff; border: 1.5px solid #E2E8F0; border-radius: 4px;
    padding: 16px; display: flex; flex-direction: column; gap: 8px;
    position: relative; transition: box-shadow .15s, transform .15s;
}
.cg__bundle:hover { box-shadow: 0 8px 24px rgba(15,35,64,.10); transform: translateY(-2px); }
.cg__bundle--featured { border-color: #C9A84C; box-shadow: 0 0 0 2px rgba(201,168,76,.18); }
.cg__bundle-badge {
    position: absolute; top: -10px; left: 50%; transform: translateX(-50%);
    background: #C9A84C; color: #0F2340; font-size: 10px; font-weight: 700;
    padding: 2px 10px; border-radius: 999px; white-space: nowrap;
    letter-spacing: .04em; text-transform: uppercase;
}
.cg__bundle-name { font-size: 15px; font-weight: 700; color: #0F2340; }
.cg__bundle-credits { display: flex; align-items: baseline; gap: 4px; }
.cg__bundle-n { font-size: 28px; font-weight: 700; color: #0F2340; line-height: 1; }
.cg__bundle-lbl { font-size: 11px; color: #6B7A8D; text-transform: uppercase; letter-spacing: .05em; }
.cg__bundle-price { font-size: 20px; font-weight: 700; color: #0F2340; line-height: 1; }
.cg__bundle-desc { font-size: 12px; color: #6B7A8D; line-height: 1.5; }
.cg__bundle-ppc {
    font-size: 11px; color: #3B6D11; font-weight: 600;
    background: #EAF3DE; padding: 2px 8px; border-radius: 999px;
    display: inline-block; margin-top: auto; align-self: flex-start;
}

/* FAQ */
.cg__faqs { display: flex; flex-direction: column; gap: 8px; }
.cg__faq { border: 1px solid #E2E8F0; border-radius: 4px; overflow: hidden; background: #fff; }
.cg__faq-q {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 12px 14px; cursor: pointer; font-size: 14px; font-weight: 600;
    color: #0F2340; list-style: none; user-select: none;
}
.cg__faq-q::-webkit-details-marker { display: none; }
.cg__faq-chevron { font-size: 15px; color: #9BA8B4; transition: transform .2s; flex-shrink: 0; }
details[open] .cg__faq-chevron { transform: rotate(180deg); }
.cg__faq-a {
    padding: 0 14px 12px; font-size: 13px; color: #6B7A8D; line-height: 1.7;
    border-top: 1px solid #EEF1F4; padding-top: 12px;
}

/* Footer */
.cg__footer {
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    padding: 16px 24px; border-top: 1px solid #EEF1F4; background: #F9FAFC;
    flex-shrink: 0; flex-wrap: wrap;
}
.cg__footer-note { font-size: 12px; color: #6B7A8D; line-height: 1.6; margin: 0; flex: 1; min-width: 180px; }
.cg__footer-cta { flex-shrink: 0; }

@media (max-width: 700px) {
    .cg__how { grid-template-columns: 1fr; }
    .cg__bundles { grid-template-columns: 1fr 1fr; }
    .cg-overlay { padding: 0; align-items: flex-end; }
    .cg { max-height: 92vh; border-radius: 10px 10px 0 0; }
}
@media (max-width: 420px) {
    .cg__bundles { grid-template-columns: 1fr; }
}
