/* =========================================================
   Standalone calculator page styles
   ========================================================= */

/* ── Hero header ─────────────────────────────────────────── */
.spc-hero {
    background: #fff;
    color: #1a1a1a;
    padding: 36px 0 0;
}

/* punkt 2: border-bottom na szerokość contentu */
.spc-hero .container {
    border-bottom: 1px solid #e8e8e8;
}

.spc-hero__body {
    margin-bottom: 28px;
}

.spc-hero__label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(0,0,0,0.35);
    margin-bottom: 8px;
}

.spc-hero__title {
    font-size: 32px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 10px;
    line-height: 1.2;
}

.spc-hero__subtitle {
    font-size: 15px;
    color: #555;
    margin: 0;
    line-height: 1.6;
    max-width: 100%;
}

/* ── Technique nav tabs ──────────────────────────────────── */
.spc-technique-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    border-top: 1px solid rgba(0,0,0,0.08);
    margin-top: 4px;
}

.spc-technique-nav__item {
    display: inline-block;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 500;
    color: rgba(0,0,0,0.45);
    text-decoration: none;
    border-bottom: 3px solid transparent;
    transition: color 0.2s, border-color 0.2s;
    white-space: nowrap;
}

.spc-technique-nav__item:hover {
    color: #1a1a1a;
    text-decoration: none;
}

.spc-technique-nav__item.active {
    color: #1a1a1a;
    border-bottom-color: #e30613;
    font-weight: 600;
}

/* ── Location variant thumbnails ────────────────────────── */
.location-variant .body .item-size {
    height: 165px;
}

/* ── Main page wrapper ───────────────────────────────────── */
.spc-standalone-page {
    padding: 32px 0 80px;
}

/* ── Sections ────────────────────────────────────────────── */
.spc-section {
    margin-bottom: 24px;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    overflow: hidden;
}

.spc-section__header {
    padding: 20px 24px 14px;
    border-bottom: 1px solid #f0f0f0;
}

.spc-section__title {
    font-size: 17px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 4px;
}

/* punkt 10: padding lewo/prawo */
.spc-section__desc {
    font-size: 13px;
    color: #777;
    margin: 0;
    line-height: 1.5;
    padding: 0;
}

.spc-section--basic #step_1 .content {
    padding: 20px 24px !important;
}

.spc-section--nadruk .basic-data,
.spc-section--nadruk #step_2 {
    padding: 20px 24px !important;
}

.spc-section .step-box,
.spc-section .step-box > .basic-data {
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* punkt 7: ukryj result-price */
.result-price {
    display: none !important;
}

/* punkt 6: 3 pola nadruku w jednej linii na desktop */
@media (min-width: 992px) {
    .location-item .data-size .values-item {
        display: flex !important;
        flex-wrap: nowrap;
        gap: 12px;
        align-items: flex-start;
    }

    .location-item .data-size .values-item > .item {
        flex: 1 1 0;
        min-width: 0;
        display: flex;
        align-items: flex-end;
        gap: 6px;
    }

    .location-item .data-size .values-item > .item .form-group {
        flex: 1;
        min-width: 0;
        margin-bottom: 0;
    }

    .location-item .data-size .values-item > .item .btn-tooltip {
        flex-shrink: 0;
        margin-bottom: 14px;
    }
}

/* tooltip — absolutny, wyrównany do środka inputa/selecta */
.spc-has-tooltip {
    display: block !important;
    position: relative;
}

.spc-has-tooltip .form-group {
    padding-right: 28px;
    margin-bottom: 0 !important;
}

.spc-has-tooltip > .btn-tooltip {
    position: absolute;
    right: 0;
    bottom: 13px; /* input_height/2 - icon_height/2 = 22 - 9 = 13px */
}

/* tooltip tekst — otwiera się w lewo */
.btn-tooltip .tooltip-text {
    right: 80%;
    left: auto !important;
}

/* punkt 5: tooltip w additional-data — otwiera się w prawo */
.additional-data .form-check .btn-tooltip {
    position: relative;
    top: -3px;
    margin-left: 4px;
}

.additional-data .btn-tooltip .tooltip-text {
    left: 100% !important;
    right: auto !important;
}

/* punkt 4: odstęp między polami w basic-data */
.step-box .basic-data .item {
    margin-bottom: 15px;
}

.step-box .basic-data .item .form-group {
    max-width: 100%;
    flex: 1;
}

/* basic-data węższe na desktop */
@media (min-width: 992px) {
    .spc-section--basic .basic-data {
        width: 100%;
        display: inline-block;
        padding-right: 47%;
    }
}

/* location items — w wierszu, jak najciaśniej */
.spc-section--nadruk .location-variant .body {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 4px 0;
}

.spc-section--nadruk .item-size.trigger-location {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 10px 12px;
    border-radius: 6px;
    cursor: pointer;
    border: 2px solid #e8e8e8;
    transition: border-color 0.15s, background 0.15s;
    flex: 1 0 auto;
    min-width: 80px;
    max-width: none;
    text-align: center;
}

.spc-section--nadruk .item-size.trigger-location:hover,
.spc-section--nadruk .item-size.trigger-location.active {
    border-color: #1a1a1a;
    background: #fafafa;
}

.spc-section--nadruk .item-size.trigger-location .thumb-size img {
    max-width: 70px;
    max-height: 70px;
    object-fit: contain;
}

.spc-section--nadruk .item-size.trigger-location .no-thumb2 {
    width: 70px;
    height: 70px;
}

.spc-section--nadruk .item-size.trigger-location .name {
    font-size: 12px;
    font-weight: 500;
    color: #1a1a1a;
    line-height: 1.3;
}

/* punkt 5: belka przyklejona — bez marginu na select-wrapper */
.shortened-result .form-group.select-wrapper.without-label {
    margin-bottom: 0 !important;
}

/* punkt 4: selects w calculator-bill pełna szerokość */
#spc-calculator-bill .calculation .custom-select,
#spc-calculator-bill .total-cost .custom-select {
    width: 100% !important;
}

/* ── Calculator-bill (punkt 2, 3, 5) ────────────────────── */
.calculator-bill {
    background: #e7ddd1;
    border: none;                   /* punkt 5 */
    border-radius: 6px;
    padding: 28px;
    margin-bottom: 32px;
    margin-left: auto;              /* punkt 2: 2/3 z prawej */
    width: 66.666%;
}

@media (max-width: 767px) {
    .calculator-bill {
        width: 100%;
        margin-left: 0;
    }
}

/* waluta prawo, auto szerokość */
.calculator-bill .currency {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 20px;
}

.calculator-bill .currency .form-group {
    width: auto;
    min-width: 0;
    margin-bottom: 0;
}

.calculator-bill .currency .form-group label {
    text-align: center;
    display: block;
}

.calculator-bill .currency .form-group.select-wrapper {
    display: inline-block;
    position: relative;
}

#spc-currency-select {
    width: auto !important;
    padding-right: 36px;
}

.calculator-bill .calculation {
    margin-bottom: 16px;
}

.calculator-bill .calculation .item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(0,0,0,0.08);
    font-size: 16px;
    color: #000;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: .5px;
}

/* punkt 7: usunięcie border-bottom dla drugiego elementu */
.calculator-bill .calculation > div:nth-child(2) {
    border-bottom: 0;
}

.calculator-bill .calculation .item .name {
    color: #000;
}

.calculator-bill .calculation .item .value {
    font-weight: 400;
}

.calculator-bill .total-cost {
    margin: 16px 0;
    padding: 16px 0;
    border-top: 2px solid rgba(0,0,0,0.12);
}

.calculator-bill .total-cost .item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.calculator-bill .total-cost .item .name {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
}

.calculator-bill .total-cost .item .variable {
    font-size: 20px;
    font-weight: 700;
    color: #000;
}

.calculator-bill .information {
    font-size: 12px;
    color: #666;
    line-height: 1.5;
    margin-bottom: 30px;
    font-style: normal;
}

/* punkt 1 + 6: przycisk czarny, rounded, hover border */
.calculator-bill .btn-red,
.calculator-bill .go-to-contact {
    display: inline-block;
    background: #1a1a1a;
    color: #fff;
    padding: .75rem 1.5rem;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 400;
    text-decoration: none;
    border: 1px solid transparent;
    transition: all .2s;
    cursor: pointer;
}

.calculator-bill .btn-red:hover,
.calculator-bill .go-to-contact:hover {
    background: transparent;
    color: #1a1a1a;
    border: 1px solid #000;
    text-decoration: none;
}

/* ── Przycisk "Wyślij wycenę" — styl jak go-to-contact ─────── */
#spc-send-quote {
    display: inline-block;
    background: #1a1a1a;
    color: #fff;
    padding: .75rem 1.5rem;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 400;
    text-decoration: none;
    border: 1px solid transparent;
    transition: all .2s;
    cursor: pointer;
}

#spc-send-quote:hover {
    background: transparent;
    color: #1a1a1a;
    border-color: #000;
}

/* ── Quote form ──────────────────────────────────────────── */
.spc-quote-form {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 28px;
    margin-bottom: 32px;
}

.spc-quote-form__title {
    font-size: 20px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 8px;
}

.spc-quote-form__desc {
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
}

.spc-quote-form__fields {
    display: grid;
    gap: 16px;
    margin-bottom: 20px;
}

@media (min-width: 768px) {
    .spc-quote-form__fields {
        grid-template-columns: 1fr 1fr 1fr;
    }
}

.spc-quote-form__actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.spc-quote-form__sending {
    font-size: 14px;
    color: #888;
}

.spc-quote-form__error {
    margin-top: 12px;
    color: #e30613;
    font-size: 14px;
}

.spc-quote-success {
    background: #f0faf0;
    border: 1px solid #5cb85c;
    border-radius: 6px;
    padding: 20px 24px;
    color: #3d7a3d;
    font-size: 15px;
    margin-bottom: 32px;
}

/* ── Sticky bottom bar ───────────────────────────────────── */
.shortened-result {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #e7ddd1;
    color: #1a1a1a;
    z-index: 1000;
    box-shadow: 0 -2px 12px rgba(0,0,0,0.15);
    padding: 14px 0;
}

.shortened-result .total-cost .item {
    display: flex;
    align-items: center;
    gap: 16px;
}

.shortened-result .total-cost .item .name {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    white-space: nowrap;
    flex: 1;
}

.shortened-result .total-cost .item .value {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.shortened-result .total-cost .item .variable {
    font-size: 22px;
    font-weight: 700;
    color: #1a1a1a;
    white-space: nowrap;
}

.shortened-result .without-label select {
    background: transparent;
    color: #1a1a1a;
    border: 1px solid rgba(0,0,0,0.25);
    border-radius: 4px;
    font-size: 12px;
    padding: 3px 24px 3px 8px;
    height: auto;
    width: auto;
    min-width: 0;
    cursor: pointer;
    line-height: normal;
    vertical-align: middle;
}

/* punkt 7: grot strzałki w select wyśrodkowany */
.shortened-result .form-group.select-wrapper::after {
    top: 50% !important;
    transform: translateY(-50%) !important;
    bottom: auto !important;
}

/* ── Spinner zmiany waluty (punkt 1) ────────────────────── */
.spc-price-loading {
    position: relative;
    color: transparent !important;
    min-width: 24px;
    min-height: 24px;
    display: inline-block;
}

.spc-price-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    border: 2px solid rgba(0,0,0,0.15);
    border-top-color: #1a1a1a;
    border-radius: 50%;
    animation: spc-spin 0.6s linear infinite;
}

@keyframes spc-spin {
    to { transform: translateY(-50%) rotate(360deg); }
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 767px) {
    #wrapper .catalog-container {
        padding-left: 0;
        padding-right: 0;
    }

    /* 2 kafelki lokalizacji w rzędzie na mobile */
    .spc-section--nadruk .item-size.trigger-location {
        flex: 0 0 calc(50% - 4px);
        max-width: calc(50% - 4px);
    }

    /* aktywna lokalizacja — zdjęcie infografiki 59% + margines */
    .location-item__thumb {
        width: 59%;
        margin-bottom: 20px;
    }


    .spc-hero__title {
        font-size: 24px;
    }

    .spc-technique-nav__item {
        padding: 10px 12px;
        font-size: 13px;
    }

    .calculator-bill {
        padding: 20px;
    }

    .calculator-bill .total-cost .item .variable {
        font-size: 18px;
    }

    .shortened-result .total-cost .item .variable {
        font-size: 16px;
    }
}

/* ── Wyśrodkowanie przycisku kontaktu ───────────────────── */
#spc-go-to-contact {
    display: table;
    margin: 0 auto;
}

/* ── #spc-calculator-bill desktop width ─────────────────── */
@media (min-width: 768px) {
    #spc-calculator-bill {
        width: 55%;
    }
}

/* ── Thumb widoczny tylko na standalone (calculator.css go ukrywa globalnie) ── */
.location-item__thumb {
    display: block;
}

/* ── Infografika po lewej w aktywnej lokalizacji ─────────── */
@media (min-width: 992px) {
    .location-item.active {
        display: flex !important;
        align-items: flex-start;
        gap: 24px;
    }

    .location-item__thumb {
        flex-shrink: 0;
        width: 130px;
    }

    .location-item__thumb img {
        width: 100%;
        height: auto;
        object-fit: contain;
    }

    .location-item .data-size {
        flex: 1;
        min-width: 0;
    }
}

/* ── Strzałka select w .spc-has-tooltip ─────────────────── */
.spc-has-tooltip .form-group.select-wrapper::after {
    right: 44px;
}