/* ============ Base ============ */
.pcalc {
    --pc-text: #111827;
    --pc-subtle: #6b7280;
    --pc-border: #e5e7eb;
    --pc-accent: #2563eb;
    --pc-fill1: #3b82f6; /* stripes A */
    --pc-fill2: #60a5fa; /* stripes B */

    font-family: system-ui, -apple-system, Segoe UI, Roboto, Inter, Arial, sans-serif;
    color: var(--pc-text);
    line-height: 1.45;
    border: 1px solid var(--pc-border);
    border-radius: 14px;
    padding: 18px;
    background: #fff;
    box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2);
}
[hidden]{display:none !important;}

/* ============ Layout ============ */
.pcalc__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
    "left right"
    "scale scale";
    gap: 20px;
}
.pcalc__col--left  { grid-area: left; }
.pcalc__col--right { grid-area: right; }
.pcalc__scale-row  { grid-area: scale; }

/* ============ Fieldsets ============ */
.pcalc-q {
    border: 1px solid var(--pc-border);
    border-radius: 12px;
    padding: 14px;
    background: #fff;
}
.pcalc-q + .pcalc-q { margin-top: 12px; }

.pcalc-q__title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 12px 0;
    font-size: 16px;
    font-weight: 700;
}
.pcalc-q__icon {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid var(--pc-border);
}

/* ============ Syringe (stacked vertically) ============ */
.pcalc-syringe-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.pcalc-syringe {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    grid-template-areas:
    "img caption"
    "img caption";
    align-items: center;
    gap: 10px 12px;
    border: 1px solid var(--pc-border);
    border-radius: 12px;
    padding: 10px;
    cursor: pointer;
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.pcalc-syringe input { position: absolute; opacity: 0; pointer-events: none; }
.pcalc-syringe__imgwrap { grid-area: img;
    width: 313px;
    max-width: 40vw; }
.pcalc-syringe__imgwrap img { display: block; width: 100%; height: auto; }
.pcalc-syringe__caption { grid-area: caption; font-weight: 700; font-size: 14px; }
.pcalc-syringe:hover { border-color: var(--pc-accent); }
.pcalc-syringe:has(input:checked) {
    background: #f5f9ff;
    border-color: var(--pc-accent);
    box-shadow: 0 0 0 3px rgba(37,99,235,.15);
}

/* ============ Small option pills ============ */
.pcalc-options {
    display: grid;
    grid-template-columns: repeat(5, minmax(0,1fr));
    gap: 8px;
}
.pcalc-options--sm .pcalc-option {
    font-size: 13px;
    padding: 8px 10px;
    border-radius: 999px;
}
.pcalc-option {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid var(--pc-border);
    background: #fff;
    cursor: pointer;
    font-weight: 700;
    transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
.pcalc-option:hover { border-color: var(--pc-accent); }
.pcalc-option input[type="radio"] { position: absolute; opacity: 0; pointer-events: none; }
.pcalc-option:has(input:checked) {
    background: #f5f9ff;
    border-color: var(--pc-accent);
    box-shadow: 0 0 0 3px rgba(37,99,235,.15);
}

/* "Other" row under the question */
.pcalc-other-row {
    margin-top: 10px;
    border-top: 1px dashed var(--pc-border);
    padding-top: 10px;
}
.pcalc-help {
    font-size: 12px;
    color: var(--pc-subtle);
    margin-bottom: 6px;
}
.pcalc-other-row__inputs {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.pcalc-other-row__inputs input {
    height: 35px;
    font-size: 14px;
}
.pcalc-other {
    width: 110px;
    border: 1px solid var(--pc-border);
    border-radius: 8px;
    padding: 6px 8px;
    font-weight: 700;
    outline: none;
}
.pcalc-other:focus {
    border-color: var(--pc-accent);
    box-shadow: 0 0 0 3px rgba(37,99,235,.15);
}
.pcalc-other__unit { font-size: 12px; color: var(--pc-subtle); }

/* ============ Scale texts + compact bar ============ */
.pcalc-scale-texts {
    margin-bottom: 8px;
    font-size: 14px;
    line-height: 1.3;
    text-align: center;
}
.pcalc-scale-texts__line1 { font-weight: 700; }
.pcalc-scale-texts__line2 { color: #b91c1c; font-weight: 700; }

.pcalc-scale {
    position: relative;
    width: 100%;
    height: 63px;
    border-radius: 10px;
    border: 1px dashed var(--pc-border);
    overflow: hidden;
    background: #f8fafc;
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
}
.pcalc-scale__fill {
    position: absolute;
    inset: 0 auto 0 0;
    width: 0%;
    /* vertical blue stripes like your sample image */
    background: linear-gradient(90deg, #00b0e1 0%, #00fadb 100%);
    opacity: 1;
    transition: width .18s ease;
}
.pcalc-scale__overlay {
    position: absolute;
    inset: 0;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    pointer-events: none;
}

/* ============ Responsive ============ */
@media (max-width: 900px) {
    .pcalc__grid { grid-template-columns: 1fr; grid-template-areas: "left" "right" "scale"; }
}
@media (max-width: 680px) {
    .pcalc-options { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .pcalc-syringe__imgwrap { width: 120px; }
}
