/* ============================================================
   Nepal Gold & Silver Price Plugin — Frontend Styles
   ============================================================ */

.fgs-wrap {
    font-family: 'Open Sans', sans-serif;
    max-width: 820px;
    margin: 0 auto;
    padding: 4px 0 16px;
}

/* ── Toggle buttons ──────────────────────────────────────── */
.fgs-toggle-col {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 50px;
    flex-shrink: 0;
}
.fgs-tab {
    padding: 5px 4px;
    font-size: 12px;
    font-weight: 700;
    text-align: center;
    cursor: pointer;
    border: none;
    border-radius: 3px;
    font-family: 'Open Sans', sans-serif;
    background: #d0d0d0;
    color: #666;
    transition: background 0.12s;
    line-height: 1.4;
}
.fgs-tab-gms.fgs-tab-active  { background: #5a5a5a; color: #fff; }
.fgs-tab-tola.fgs-tab-active { background: #b88800; color: #fff; }

/* ── Nepali date box ─────────────────────────────────────── */
.fgs-date-box {
    background: #fff;
    border: 2px solid #bbb;
    border-radius: 3px;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 72px;
    overflow: hidden;
    flex-shrink: 0;
}
.fgs-d-day {
    font-family: 'Oswald', sans-serif;
    font-size: 36px;
    font-weight: 700;
    color: #111;
    line-height: 1;
    padding: 5px 4px 3px;
    width: 100%;
    text-align: center;
}
.fgs-d-month {
    background: #1b3060;
    color: #fff;
    width: 100%;
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 2px;
}
.fgs-d-year {
    color: #111;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 2px;
    width: 100%;
    text-align: center;
}

/* ── Layout ──────────────────────────────────────────────── */
.fgs-view { margin-bottom: 6px; }
.fgs-row  { display: flex; align-items: stretch; gap: 6px; }
.fgs-left { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; flex-shrink: 0; }

/* ── Cards ───────────────────────────────────────────────── */
.fgs-cards {
    display: flex;
    gap: 4px;
    flex: 1;
    min-width: 0;
}
.fgs-card {
    flex: 1;
    min-width: 0;
    border-radius: 4px;
    padding: 13px 12px 15px 11px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    animation: fgsCardIn 0.35s ease both;
}
.fgs-card-gold   { background: #F5B800; border: 2px solid #c89000; }
.fgs-card-silver { background: #e8e8e8; border: 2px solid #aaa; }
.fgs-card:nth-child(2) { animation-delay: 0.07s; }

@keyframes fgsCardIn {
    from { opacity: 0; transform: translateY(5px); }
    to   { opacity: 1; transform: none; }
}

/* ── Card bar (SVG) ──────────────────────────────────────── */
.fgs-bar { flex-shrink: 0; width: 56px; margin-top: 4px; }
.fgs-bar svg { width: 100%; height: auto; display: block; }

/* ── Card body ───────────────────────────────────────────── */
.fgs-cbody { flex: 1; min-width: 0; }
.fgs-ctitle {
    font-size: 13px;
    font-weight: 800;
    color: #111;
    line-height: 1.25;
    margin-bottom: 1px;
    white-space: nowrap;
}
.fgs-cunit  { font-size: 12px; color: #333; margin-bottom: 8px; }
.fgs-cprice { display: flex; align-items: baseline; }
.fgs-pcur   { font-size: 14px; font-weight: 700; color: #111; margin-right: 2px; flex-shrink: 0; }
.fgs-pamt   {
    font-family: 'Oswald', sans-serif;
    font-size: 30px;
    font-weight: 700;
    color: #111;
    line-height: 1;
    letter-spacing: -0.01em;
}
.fgs-psfx   { font-size: 18px; font-weight: 700; color: #111; line-height: 1; margin-left: 1px; }

/* ── Source bar ──────────────────────────────────────────── */
.fgs-source {
    font-size: 11px;
    color: #aaa;
    text-align: right;
    margin-top: 7px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    flex-wrap: wrap;
}
.fgs-source a   { color: #b08800; text-decoration: none; }
.fgs-source a:hover { text-decoration: underline; }
.fgs-ago { color: #ccc; }
.fgs-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    background: #2e9e2e;
    border-radius: 50%;
    animation: fgsBlink 2s infinite;
    flex-shrink: 0;
}
@keyframes fgsBlink { 0%,100%{opacity:1} 50%{opacity:.25} }

/* ── Notice (no data yet) ────────────────────────────────── */
.fgs-notice {
    background: #fff8e1;
    border: 1px solid #ffe082;
    border-radius: 3px;
    padding: 10px 14px;
    font-size: 13px;
    color: #7a5800;
}
.fgs-notice a { color: #b08800; }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 580px) {
    .fgs-ctitle { font-size: 11px; white-space: normal; }
    .fgs-pamt   { font-size: 22px; }
    .fgs-psfx   { font-size: 14px; }
    .fgs-bar    { width: 42px; }
    .fgs-d-day  { font-size: 26px; }
    .fgs-date-box { width: 58px; }
}
@media (max-width: 380px) {
    .fgs-cards { flex-direction: column; }
}
