/**
 * PisoCHile M² Calculator v4
 * No borders · transparent · professional pricing · fluid mobile
 */

/* ── Utility ─────────────────────────────────────────────────────────────── */
.pcf-hidden { display: none !important; }

/* ── Wrapper ─────────────────────────────────────────────────────────────── */
.pcf-calc {
    margin-bottom: 28px;
    padding: 0;
    background: transparent;
    border: none;
    font-family: inherit;
    color: inherit;
}

/* ── Header ──────────────────────────────────────────────────────────────── */
.pcf-calc__header {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 18px;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: #b0b0b0;
}
.pcf-icon { color: #c8c8c8; flex-shrink: 0; }

/* ── Body ────────────────────────────────────────────────────────────────── */
.pcf-calc__body { padding: 0; }

/* ── Ancho pill selector ─────────────────────────────────────────────────── */
.pcf-ancho-selector {
    margin-bottom: 18px;
}
.pcf-ancho-selector__label {
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: #b0b0b0;
    margin: 0 0 10px;
}
.pcf-ancho-selector__pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.pcf-ancho-pill {
    display: inline-flex;
    align-items: center;
    padding: 7px 18px;
    border-radius: 100px;
    border: 1.5px solid rgba(0, 0, 0, .12);
    background: transparent;
    font-family: inherit;
    font-size: .85rem;
    font-weight: 600;
    color: #555;
    cursor: pointer;
    transition: border-color .15s, background .15s, color .15s, transform .1s;
    -webkit-tap-highlight-color: transparent;
    outline: none;
}
.pcf-ancho-pill:hover {
    border-color: rgba(0, 0, 0, .28);
    color: #111;
}
.pcf-ancho-pill:active { transform: scale(.96); }
.pcf-ancho-pill--active {
    border-color: #1a1a1a;
    background: #1a1a1a;
    color: #fff;
}

/* ── Input row ───────────────────────────────────────────────────────────── */
.pcf-calc__inputs {
    display: flex;
    align-items: flex-end;
    gap: 14px;
}
.pcf-calc__field { flex: 1; min-width: 0; }

.pcf-calc__field-label {
    display: block;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: #b0b0b0;
    margin-bottom: 7px;
}

/* Input underline style */
.pcf-calc__input-wrap {
    display: flex;
    align-items: stretch;
    border: none;
    border-bottom: 1.5px solid rgba(0, 0, 0, .12);
    background: transparent;
    transition: border-color .15s;
}
.pcf-calc__input-wrap:focus-within { border-bottom-color: rgba(0, 0, 0, .5); }
.pcf-calc__input-wrap.pcf-locked   { border-bottom-color: rgba(0, 0, 0, .06); }
.pcf-calc__input-wrap.pcf-locked:focus-within { border-bottom-color: rgba(0, 0, 0, .06); }

.pcf-calc__input {
    flex: 1;
    min-width: 0;
    width: 100% !important;
    padding: 8px 4px 8px 0 !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    background: transparent !important;
    font-size: 1.2rem !important;
    font-weight: 700 !important;
    color: #1a1a1a !important;
    line-height: 1.2 !important;
    margin: 0 !important;
    -moz-appearance: textfield;
}
.pcf-calc__input::placeholder { color: #d8d8d8 !important; font-weight: 400 !important; }
.pcf-calc__input::-webkit-inner-spin-button,
.pcf-calc__input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.pcf-calc__input:disabled { color: #aaa !important; cursor: default; }

.pcf-calc__unit {
    display: flex;
    align-items: flex-end;
    padding-bottom: 9px;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #c0c0c0;
    user-select: none;
    flex-shrink: 0;
}

.pcf-calc__times {
    font-size: .95rem;
    font-weight: 300;
    color: #d0d0d0;
    flex-shrink: 0;
    align-self: flex-end;
    padding-bottom: 10px;
}

/* ── Roll lock badge ─────────────────────────────────────────────────────── */
.pcf-calc__roll-lock {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 6px;
    font-size: .71rem;
    color: #c0c0c0;
    font-style: italic;
}

/* ── Hint ────────────────────────────────────────────────────────────────── */
.pcf-calc__hint {
    margin: 10px 0 0;
    font-size: .73rem;
    color: #ccc;
    line-height: 1.4;
}

/* ── Roll min notice ─────────────────────────────────────────────────────── */
.pcf-calc__roll-notice {
    margin: 14px 0 0;
    padding: 8px 12px;
    background: rgba(210, 160, 0, .06);
    border-left: 2px solid rgba(180, 130, 0, .25);
    border-radius: 0 4px 4px 0;
    font-size: .78rem;
    color: #7a5800;
    line-height: 1.4;
}

/* ── Price per box badge ─────────────────────────────────────────────────── */
.pcf-price-badge {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-top: 20px;
    padding: 12px 16px;
    background: rgba(0, 0, 0, .03);
    border-radius: 10px;
}
.pcf-price-badge__label {
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #999;
}
.pcf-price-badge__price {
    font-size: 1.15rem;
    font-weight: 800;
    color: #1a1a1a;
    letter-spacing: -.01em;
}

/* ── Summary ─────────────────────────────────────────────────────────────── */
.pcf-calc__summary {
    margin-top: 20px;
    border: none;
    background: transparent;
    font-size: .84rem;
}
.pcf-calc__summary-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 6px 0;
    border-bottom: 1px solid rgba(0, 0, 0, .05);
}
.pcf-calc__summary-row:last-child { border-bottom: none; }

.pcf-summary-total {
    padding-top: 11px;
    border-top: 1.5px solid rgba(0, 0, 0, .1);
    border-bottom: none;
    margin-top: 4px;
}

#pcf-boxes-divider {
    padding: 14px 0 2px;
    border-bottom: none;
}
.pcf-section-micro {
    font-size: .66rem;
    font-weight: 700;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: #c0c0c0;
}

.pcf-calc__summary-label { color: #888; }
.pcf-calc__summary-value { font-variant-numeric: tabular-nums; color: #222; }
.pcf-waste-value { color: #b07000; }
.pcf-bold { font-weight: 700 !important; color: #111 !important; }

.pcf-boxes-count,
.pcf-boxes-m2 { font-weight: 700; color: #1a4a90; }

/* Total estimated price row */
.pcf-boxes-price-row {
    padding-top: 12px !important;
    border-top: 1.5px solid rgba(0, 0, 0, .08) !important;
    border-bottom: none !important;
    margin-top: 4px;
}
.pcf-price-total {
    font-size: 1.1rem;
    font-weight: 800;
    color: #111;
    letter-spacing: -.01em;
    font-variant-numeric: tabular-nums;
}

/* ── Result banner ───────────────────────────────────────────────────────── */
.pcf-calc__result {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin-top: 18px;
    padding: 12px 15px;
    border-radius: 10px;
    background: rgba(22, 110, 44, .05);
    border-left: 2px solid rgba(22, 110, 44, .22);
    color: #1a5c1a;
    font-size: .84rem;
    font-weight: 600;
    line-height: 1.4;
    animation: pcf-up .2s ease;
}
.pcf-calc__result svg { flex-shrink: 0; margin-top: 2px; }

/* ── Error banner ────────────────────────────────────────────────────────── */
.pcf-calc__error {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin-top: 18px;
    padding: 12px 15px;
    border-radius: 10px;
    background: rgba(160, 0, 0, .04);
    border-left: 2px solid rgba(160, 0, 0, .18);
    color: #8b1a1a;
    font-size: .82rem;
    font-weight: 500;
    line-height: 1.4;
    animation: pcf-up .2s ease;
}
.pcf-calc__error svg { flex-shrink: 0; margin-top: 2px; }

@keyframes pcf-up {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   MOBILE  ≤ 560 px
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
@media ( max-width: 560px ) {

    .pcf-calc { margin-bottom: 22px; }

    .pcf-ancho-pill { padding: 6px 15px; font-size: .82rem; }

    /* Stack Largo + Ancho vertically */
    .pcf-calc__inputs {
        flex-direction: column;
        gap: 18px;
        align-items: stretch;
    }
    .pcf-calc__field { width: 100%; flex: none; }
    .pcf-calc__times { display: none; }

    /* Prefix Ancho label with × when stacked */
    .pcf-calc__field:last-child .pcf-calc__field-label::before {
        content: '× ';
        color: #ddd;
        font-weight: 300;
    }

    .pcf-calc__input { font-size: 1.25rem !important; }

    .pcf-price-badge { flex-direction: column; gap: 4px; padding: 11px 14px; }
    .pcf-price-badge__price { font-size: 1.3rem; }

    .pcf-calc__summary-row { padding: 7px 0; }
    .pcf-price-total { font-size: 1.05rem; }

    .pcf-calc__result,
    .pcf-calc__error { padding: 10px 13px; font-size: .81rem; }
}

@media ( max-width: 360px ) {
    .pcf-calc__input { font-size: 1.1rem !important; }
    .pcf-ancho-pill  { padding: 5px 13px; font-size: .8rem; }
}
