/* =============================================
   Beton Calculator — Stylesheet
   ---------------------------------------------
   The accent colour follows the Elementor global
   colour (--e-global-color-primary) with a hard
   fallback so the calculator still works on
   non-Elementor themes.
   ============================================= */

.bc-wrapper {
    --bc-primary:      var(--e-global-color-primary, #E8600A);
    --bc-primary-soft: rgba(232, 96, 10, .12);
    --bc-dark:         #1A1A2E;
    --bc-mid:          #3A3A55;
    --bc-light:        #F5F5F0;
    --bc-border:       #DDDDD5;
    --bc-radius:       10px;
    --bc-shadow:       0 2px 12px rgba(0, 0, 0, .08);

    font-family: inherit;
    max-width: 780px;
    margin: 0 auto;
    color: var(--bc-dark);
}

@supports (color: color-mix(in srgb, red 10%, transparent)) {
    .bc-wrapper {
        --bc-primary-soft: color-mix(in srgb, var(--bc-primary) 14%, transparent);
    }
}

/* Honour the [hidden] attribute even for flex rows */
.bc-wrapper [hidden] { display: none !important; }

/* ---- Step indicator ---- */
.bc-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 32px;
}

.bc-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    opacity: .4;
    transition: opacity .3s;
}

.bc-step.active,
.bc-step.done { opacity: 1; }

.bc-step__num {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bc-border);
    color: var(--bc-mid);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: .9rem;
    transition: background .3s, color .3s;
}

.bc-step.active .bc-step__num {
    background: var(--bc-primary);
    color: #fff;
}

.bc-step.done .bc-step__num {
    background: var(--bc-dark);
    color: #fff;
}

.bc-step__label {
    font-size: .75rem;
    font-weight: 600;
    color: var(--bc-mid);
    white-space: nowrap;
}

.bc-step-line {
    flex: 1;
    height: 2px;
    background: var(--bc-border);
    margin: 0 12px 22px;
}

/* ---- Panels ---- */
.bc-panel {
    display: none;
    animation: bcFadeIn .3s ease;
}

.bc-panel.active { display: block; }

@keyframes bcFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.bc-panel__title {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0 0 6px;
    color: var(--bc-dark);
}

.bc-panel__sub {
    color: var(--bc-mid);
    margin: 0 0 24px;
}

/* ---- Field groups ---- */
.bc-field-group { margin-bottom: 24px; }

.bc-label {
    display: block;
    font-weight: 600;
    font-size: .9rem;
    margin-bottom: 10px;
    color: var(--bc-dark);
}

.bc-label--sm {
    font-size: .85rem;
    margin-bottom: 4px;
}

.bc-manual-volume { margin-top: 16px; margin-bottom: 0; }

.bc-hint {
    margin: 8px 0 0;
    font-size: .8rem;
    color: #888;
}

/* ---- Radio cards ---- */
.bc-radio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
}

.bc-radio-grid--auto {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
}

.bc-radio-card input { position: absolute; opacity: 0; pointer-events: none; }

.bc-radio-card__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 14px 10px;
    border: 2px solid var(--bc-border);
    border-radius: var(--bc-radius);
    cursor: pointer;
    font-size: .8rem;
    font-weight: 600;
    color: var(--bc-mid);
    background: #fff;
    transition: border-color .2s, color .2s, box-shadow .2s;
    text-align: center;
    height: 100%;
    box-sizing: border-box;
}

.bc-radio-card__inner svg {
    width: 28px;
    height: 28px;
    stroke: var(--bc-mid);
    transition: stroke .2s;
}

.bc-radio-card input:checked + .bc-radio-card__inner {
    border-color: var(--bc-primary);
    color: var(--bc-primary);
    box-shadow: 0 0 0 3px var(--bc-primary-soft);
}

.bc-radio-card input:checked + .bc-radio-card__inner svg {
    stroke: var(--bc-primary);
}

.bc-radio-card input:focus-visible + .bc-radio-card__inner {
    outline: 2px solid var(--bc-primary);
    outline-offset: 2px;
}

.bc-radio-card__inner:hover { border-color: var(--bc-primary); }

/* ---- Select ---- */
.bc-select-wrapper { position: relative; }

.bc-select-wrapper select {
    width: 100%;
    padding: 10px 40px 10px 14px;
    border: 2px solid var(--bc-border);
    border-radius: var(--bc-radius);
    font-size: .9rem;
    font-family: inherit;
    color: var(--bc-dark);
    background: #fff;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    transition: border-color .2s;
}

.bc-select-wrapper::after {
    content: '▾';
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--bc-mid);
}

.bc-select-wrapper select:focus {
    outline: none;
    border-color: var(--bc-primary);
}

/* ---- Dimensions ---- */
.bc-dimensions {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.bc-dim { flex: 1; min-width: 80px; }

.bc-dim label {
    display: block;
    font-size: .78rem;
    color: var(--bc-mid);
    margin-bottom: 4px;
}

.bc-dim input,
.bc-input-manual {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid var(--bc-border);
    border-radius: var(--bc-radius);
    font-size: .95rem;
    font-family: inherit;
    color: var(--bc-dark);
    box-sizing: border-box;
    transition: border-color .2s;
}

.bc-input-manual { max-width: 200px; }

.bc-dim input:focus,
.bc-input-manual:focus {
    outline: none;
    border-color: var(--bc-primary);
}

.bc-dim-sep {
    font-size: 1.3rem;
    color: var(--bc-mid);
    padding-bottom: 10px;
}

.bc-volume-result {
    margin-top: 12px;
    padding: 12px 16px;
    background: var(--bc-light);
    border-radius: var(--bc-radius);
    font-size: .9rem;
}

.bc-volume-sub {
    color: #888;
    font-size: .8rem;
    margin-left: 8px;
}

/* ---- Checkboxes ---- */
.bc-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: .9rem;
    margin-bottom: 12px;
    user-select: none;
}

.bc-checkbox input { position: absolute; opacity: 0; pointer-events: none; }

.bc-checkbox__box {
    width: 20px;
    height: 20px;
    border: 2px solid var(--bc-border);
    border-radius: 5px;
    flex-shrink: 0;
    background: #fff;
    transition: background .2s, border-color .2s;
    position: relative;
}

.bc-checkbox input:checked + .bc-checkbox__box {
    background: var(--bc-primary);
    border-color: var(--bc-primary);
}

.bc-checkbox input:checked + .bc-checkbox__box::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 2px;
    width: 6px;
    height: 10px;
    border: 2px solid #fff;
    border-top: none;
    border-left: none;
    transform: rotate(45deg);
}

.bc-checkbox input:focus-visible + .bc-checkbox__box {
    outline: 2px solid var(--bc-primary);
    outline-offset: 2px;
}

.bc-checkbox__price { color: #888; font-size: .82rem; }

/* ---- Price card ---- */
.bc-price-card {
    background: var(--bc-dark);
    color: #fff;
    border-radius: var(--bc-radius);
    padding: 20px 24px;
    margin: 24px 0;
}

.bc-price-card__title {
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .1em;
    opacity: .6;
    margin-bottom: 16px;
}

.bc-price-rows { display: flex; flex-direction: column; gap: 8px; }

.bc-price-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    font-size: .88rem;
    opacity: .85;
}

.bc-price-row--subtotal {
    border-top: 1px solid rgba(255, 255, 255, .15);
    padding-top: 8px;
    margin-top: 4px;
    opacity: .95;
}

.bc-price-row--btw { font-size: .82rem; opacity: .65; }

.bc-price-row--total {
    border-top: 2px solid rgba(255, 255, 255, .25);
    padding-top: 10px;
    margin-top: 4px;
    font-size: 1.1rem;
    font-weight: 700;
    opacity: 1;
}

.bc-price-row--total strong {
    color: var(--bc-primary);
    font-size: 1.25rem;
}

.bc-price-card__disclaimer {
    margin: 12px 0 0;
    font-size: .73rem;
    opacity: .4;
}

/* ---- Summary ---- */
.bc-summary {
    background: var(--bc-light);
    border-radius: var(--bc-radius);
    padding: 16px 20px;
    margin-bottom: 24px;
}

.bc-summary__row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    font-size: .88rem;
    padding: 6px 0;
    border-bottom: 1px solid var(--bc-border);
}

.bc-summary__row:last-child { border-bottom: none; }

.bc-summary__row--total {
    font-weight: 700;
    font-size: 1rem;
    color: var(--bc-primary);
}

/* ---- Buttons ---- */
.bc-nav {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
}

.bc-btn {
    padding: 12px 28px;
    border-radius: var(--bc-radius);
    font-size: .9rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    border: none;
    transition: background .2s, transform .1s, filter .2s;
}

.bc-btn:active { transform: scale(.97); }

.bc-btn--primary {
    background: var(--bc-primary);
    color: #fff;
}

.bc-btn--primary:hover { filter: brightness(.9); }

.bc-btn--ghost {
    background: transparent;
    border: 2px solid var(--bc-border);
    color: var(--bc-mid);
}

.bc-btn--ghost:hover {
    border-color: var(--bc-primary);
    color: var(--bc-primary);
}

.bc-btn:focus-visible {
    outline: 2px solid var(--bc-primary);
    outline-offset: 2px;
}

/* ---- GForm notice ---- */
.bc-gform-notice {
    background: #FFF3CD;
    border: 1px solid #FFD77A;
    border-radius: var(--bc-radius);
    padding: 16px 20px;
    font-size: .9rem;
    color: #856404;
}

.bc-gform-wrapper .gform_wrapper { margin: 0; }

/* ---- Responsive ---- */
@media (max-width: 600px) {
    .bc-steps { gap: 4px; }
    .bc-step__label { display: none; }
    .bc-radio-grid,
    .bc-radio-grid--auto { grid-template-columns: repeat(2, 1fr); }
    .bc-dimensions { flex-direction: column; align-items: stretch; }
    .bc-dim-sep { display: none; }
    .bc-nav { flex-direction: column-reverse; }
    .bc-btn { width: 100%; text-align: center; }
    .bc-input-manual { max-width: 100%; }
}
