/* ============================================================
   NDB Fund Calculator – Frontend Styles
   Dark Mode · Poppins · #B3252C Accent
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

.ndb-calc-wrap {
    --red:      #B3252C;
    --red-dim:  rgba(179,37,44,.15);
    --bg:       #0e0e0e;
    --surface:  rgba(0,0,0,0.55);
    --border:   rgba(255,255,255,.15);
    --border2:  rgba(255,255,255,.08);
    --text:     #ffffff;
    --muted:    #9a9a9a;
    --green:    #4caf50;
    --danger:   #ff4444;
    --font:     'Poppins', sans-serif;

    font-family: var(--font);
    display:     flex;
    justify-content: center;
    padding:     8px 0;
}

.ndb-calc-box {
    background:    var(--surface);
    border:        1px solid var(--border);
    border-radius: 20px;
    padding:       28px 28px 24px;
    width:         100%;
    max-width:     440px;
    color:         var(--text);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow:    0 8px 40px rgba(0,0,0,.6);
}

/* ── Fund Select ─────────────────────────────────────────── */
.ndb-calc-field-label {
    display:        block;
    font-size:      .65rem;
    font-weight:    500;
    letter-spacing: .1em;
    text-transform: uppercase;
    color:          var(--muted);
    margin-bottom:  6px;
}

.ndb-calc-select-wrap {
    position: relative;
    margin-bottom: 22px;
}

.ndb-calc-select {
    width:         100%;
    background:    rgba(255,255,255,.06);
    color:         var(--text);
    border:        1px solid var(--border);
    border-radius: 10px;
    padding:       11px 38px 11px 14px;
    font-family:   var(--font);
    font-size:     .85rem;
    font-weight:   400;
    appearance:    none;
    -webkit-appearance: none;
    outline:       none;
    cursor:        pointer;
    transition:    border-color .18s, background .18s;
}
.ndb-calc-select:focus { border-color: var(--red); background: rgba(255,255,255,.09); }
.ndb-calc-select option { background: #1a1a1a; color: #fff; }

.ndb-select-chevron {
    position:  absolute;
    right:     12px;
    top:       50%;
    transform: translateY(-50%);
    width:     18px; height: 18px;
    color:     var(--muted);
    pointer-events: none;
}

/* ── Investment amount ───────────────────────────────────── */
.ndb-invest-label {
    font-size:      .72rem;
    color:          var(--muted);
    letter-spacing: .04em;
    margin-bottom:  4px;
}

.ndb-invest-amount {
    font-size:   2.2rem;
    font-weight: 600;
    line-height: 1.1;
    margin:      4px 0 18px;
    letter-spacing: -.02em;
}

/* ── Slider ──────────────────────────────────────────────── */
.ndb-slider-wrap { margin-bottom: 4px; }

.ndb-slider-wrap input[type="range"] {
    width:      100%;
    appearance: none;
    -webkit-appearance: none;
    height:     4px;
    background: rgba(255,255,255,.18);
    border-radius: 10px;
    outline:    none;
    cursor:     pointer;
}
.ndb-slider-wrap input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    -webkit-appearance: none;
    width:      18px; height: 18px;
    background: var(--red);
    border:     2px solid #fff;
    border-radius: 50%;
    cursor:     pointer;
    transition: transform .15s;
    box-shadow: 0 2px 8px rgba(0,0,0,.4);
}
.ndb-slider-wrap input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.15); }
.ndb-slider-wrap input[type="range"]::-moz-range-thumb {
    width:      18px; height: 18px;
    background: var(--red);
    border:     2px solid #fff;
    border-radius: 50%;
    cursor:     pointer;
}

.ndb-slider-labels {
    display:         flex;
    justify-content: space-between;
    font-size:       .64rem;
    color:           var(--muted);
    margin-top:      5px;
    padding:         0 2px;
}

/* ── Divider ─────────────────────────────────────────────── */
.ndb-result-divider {
    height:     1px;
    background: var(--border2);
    margin:     20px 0 16px;
}

/* ── Result ──────────────────────────────────────────────── */
.ndb-becomes {
    font-size:      .68rem;
    font-weight:    500;
    letter-spacing: .08em;
    text-transform: uppercase;
    color:          var(--red);
    margin-bottom:  6px;
}

.ndb-result-amount {
    font-size:      2.8rem;
    font-weight:    700;
    line-height:    1;
    letter-spacing: -.03em;
    transition:     color .2s;
}
.ndb-result-amount.is-negative { color: var(--danger); }

.ndb-gain-loss {
    font-size:  .8rem;
    margin-top: 6px;
    font-weight: 500;
    min-height: 22px;
    transition: color .2s;
}
.ndb-gain-loss.is-positive { color: var(--green); }
.ndb-gain-loss.is-negative { color: var(--danger); }

/* ── Rate badge ──────────────────────────────────────────── */
.ndb-rate-badge {
    display:       inline-block;
    margin-top:    10px;
    padding:       3px 10px;
    border-radius: 20px;
    font-size:     .7rem;
    font-weight:   600;
    letter-spacing: .05em;
    min-height:    22px;
}
.ndb-rate-badge.is-pos { background: rgba(76,175,80,.15); color: #4caf50; border: 1px solid rgba(76,175,80,.3); }
.ndb-rate-badge.is-neg { background: rgba(255,68,68,.12); color: #ff6b6b; border: 1px solid rgba(255,68,68,.25); }

/* ── Note ────────────────────────────────────────────────── */
.ndb-calc-note {
    font-size:   .65rem;
    color:       var(--muted);
    margin-top:  14px;
    line-height: 1.55;
    border-top:  1px solid var(--border2);
    padding-top: 12px;
}

/* ── Pending section ─────────────────────────────────────── */
.ndb-pending-box {
    margin-top:    20px;
    border:        1px dashed rgba(255,255,255,.2);
    border-radius: 12px;
    padding:       22px 18px;
    text-align:    center;
}
.ndb-pending-icon  { font-size: 2rem; margin-bottom: 8px; }
.ndb-pending-name  { font-size: .95rem; font-weight: 600; margin-bottom: 6px; color: var(--text); }
.ndb-pending-msg   { font-size: .8rem; color: var(--muted); margin-bottom: 6px; }
.ndb-pending-sub   { font-size: .7rem; color: rgba(255,255,255,.35); }

/* ── Empty state ─────────────────────────────────────────── */
.ndb-empty-state {
    text-align:  center;
    padding:     32px 10px;
    color:       var(--muted);
    font-size:   .82rem;
    line-height: 1.6;
}
.ndb-empty-icon { font-size: 2.2rem; margin-bottom: 10px; display: block; }

/* ── Mobile ──────────────────────────────────────────────── */
@media (max-width: 500px) {
    .ndb-calc-box      { padding: 20px 18px; border-radius: 16px; }
    .ndb-invest-amount { font-size: 1.8rem; }
    .ndb-result-amount { font-size: 2.2rem; }
}
