/* Propiffy free tools — small additions on top of the site's Tailwind theme.
   Colours come from the site's CSS variables, so light/dark mode just works. */

.pf-tool { overflow-x: clip; }

/* Symbol switcher pills */
.pf-pills { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }
.pf-pill {
    display: inline-flex; align-items: center; min-height: 40px; padding: 0 .9rem;
    border-radius: 999px; border: 1px solid rgb(var(--c-edge));
    background: rgb(var(--c-card)); color: rgb(var(--c-ink));
    font: 600 .8rem/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .04em;
    text-decoration: none; transition: border-color .15s, background .15s, color .15s;
}
.pf-pill:hover { border-color: rgb(var(--c-forest)); color: rgb(var(--c-forest)); }
.pf-pill:focus-visible { outline: 2px solid rgb(var(--c-forest)); outline-offset: 2px; }
.pf-pill[aria-current="page"] { background: rgb(var(--c-forest)); border-color: rgb(var(--c-forest)); color: #fff; }

/* Chart box: fixed height so the page never jumps while the widget loads */
.pf-chart__inner { position: relative; height: 420px; }
@media (min-width: 768px) { .pf-chart__inner { height: 580px; } }
.pf-chart__loading {
    position: absolute; inset: 0; display: grid; place-items: center;
    color: rgb(var(--c-mutedfg)); font-size: .875rem;
}

/* Converter */
.pf-cv-grid { display: grid; gap: .75rem; grid-template-columns: 1fr; align-items: end; }
@media (min-width: 640px) { .pf-cv-grid { grid-template-columns: 1fr 1fr auto 1fr; } }
.pf-input {
    width: 100%; height: 48px; padding: 0 .85rem; border-radius: .6rem;
    border: 1px solid rgb(var(--c-edge)); background: rgb(var(--c-cream)); color: rgb(var(--c-ink));
    font-size: 1rem; /* 16px stops iOS zoom-on-focus */
}
.pf-input:focus { outline: none; box-shadow: 0 0 0 3px rgb(var(--c-forest) / .35); border-color: rgb(var(--c-forest)); }
.pf-swap {
    height: 48px; min-width: 48px; border-radius: .6rem; border: 1px solid rgb(var(--c-edge));
    background: rgb(var(--c-card)); color: rgb(var(--c-forest)); font-size: 1.25rem; cursor: pointer;
    justify-self: center;
}
.pf-swap:hover { border-color: rgb(var(--c-forest)); }
.pf-swap:focus-visible { outline: 2px solid rgb(var(--c-forest)); outline-offset: 2px; }
.pf-result {
    margin-top: .25rem; font-family: inherit; font-weight: 700; line-height: 1.1;
    font-size: clamp(1.75rem, 6vw, 2.75rem); color: rgb(var(--c-forest)); word-break: break-word;
}
.pf-result span { font-size: .55em; color: rgb(var(--c-ink)); font-weight: 600; }
.pf-notice {
    margin-top: .75rem; padding: .6rem .8rem; border-radius: .5rem; font-size: .8rem;
    border: 1px solid rgb(245 158 11 / .5); background: rgb(245 158 11 / .1); color: rgb(217 119 6);
}
.pf-notice[hidden] { display: none; }
