.calc-page {
    padding: 100px 16px 40px;
}

.calculator-container {
    max-width: 960px;
    margin: 0 auto;
    background: var(--primary-dark-color);
    border-radius: 32px;
    overflow: hidden;
    color: var(--primary-light-text);
}

.calc-header {
    background: var(--color-blue);
    padding: 36px 55px;
    text-align: center;
}

.calc-header-title {
    font-weight: 600;
    font-size: 24px;
    text-align: center;
}

.calc-body {
    padding: 45px 30px 45px 60px;
}

.calc-main-row {
    display: grid;
    grid-template-columns: 1.25fr .75fr;
    gap: 40px;
    align-items: start;
}

.step-content-pane {
    display: none;
    animation: fadeIn .35s ease forwards;
}

.step-content-pane.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(12px)
    }

    to {
        opacity: 1;
        transform: translateY(0)
    }
}

.form-group {
    margin-bottom: 24px;
    position: relative;
}

.form-label {
    display: block;
    font-weight: 600;
}

.text-input {
    width: 100%;
    padding: 11px 21px;
    border-radius: 17px;
    height: 40px;
    background: #fff;
    color: var(--primary-black-text);
    border-width: 2px;
    border-style: solid;
}

.iti {
    color: var(--primary-black-text);
    width: 100%;
}

textarea.text-input {
    min-height: 70px;
    border-radius: 17px;
    resize: none;
}

.iti__selected-dial-code {
    display: none;
}

.text-input::placeholder {
    font-size: 14px;
    color: #BDBDBD;
}

.text-input:focus {
    border-color: var(--color-blue);
}

.toggle-container {
    display: inline-flex;
    align-items: center;
    gap: 20px;
    padding-top: 6px;
}

.toggle-label {
    font-size: 14px;
    user-select: none;
    opacity: 0.8;
}

.toggle-label.active {
    opacity: 1;
}

.toggle-switch-wrap {
    width: 78px;
    height: 26px;
    border: 0;
    border-radius: 999px;
    background: #fff;
    position: relative;
    cursor: pointer;
}

.toggle-switch-thumb {
    position: absolute;
    top: calc(50% - 8px);
    left: 6px;
    width: 35px;
    height: 16px;
    border-radius: 13px;
    background: var(--color-blue);
    transition: transform .25s ease;
}

.toggle-switch-wrap.checked .toggle-switch-thumb {
    transform: translateX(32px);
}

.custom-select-wrap {
    position: relative;
    cursor: pointer;
}

.select-selected {
    width: 100%;
    padding: 11px 21px;
    border-radius: 17px;
    min-height: 40px;
    background: #fff;
    color: var(--primary-black-text);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.select-arrow {
    width: 12px;
    height: 8px;
    stroke: #1e293b;
    fill: none;
    stroke-width: 2.5;
}

.select-items {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    z-index: 20;
    display: none;
    max-height: 240px;
    overflow: auto;
    background: #fff;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, .15);
    box-shadow: 0 10px 25px rgba(0, 0, 0, .15);
}

.custom-select-wrap.active .select-items {
    display: block;
}

.select-item {
    padding: 12px 24px;
    color: var(--primary-black-text);
    font-size: 14px;
}

.select-item:hover {
    background: #f1f5f9;
}

.select-item.selected {
    background: #e2e8f0;
}

.custom-select-wrap.multi-select .select-item {
    position: relative;
    padding-right: 40px;
}

.custom-select-wrap.multi-select .select-item::after {
    content: '';
    position: absolute;
    right: 14px;
    top: 50%;
    width: 16px;
    height: 16px;
    border: 1px solid #D9D9D9;
    transform: translateY(-50%);
}

.custom-select-wrap.multi-select .select-item.selected::after {
    content: '✓';
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-dark-color);
}


.input-btn-group {
    display: flex;
    align-items: center;
}

.input-btn-group .text-input {
    flex: 1;
    border-radius: 17px 0 0 17px;
    border: none;
}

.input-btn-group .btn-inline {
    border-radius: 0 17px 17px 0;
}

.btn-inline {
    cursor: pointer;
    transition: all .25s ease;
}

.btn-next,
.btn-action-outline,
.btn-action-solid {
    border-radius: 10px;
    cursor: pointer;
    transition: all .25s ease;
}

.btn-inline {
    padding: 6px 21px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-blue);
    color: var(--primary-light-text);
    font-size: 10px;
}

.checkbox-container {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.custom-checkbox-row {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}

.checkbox-box {
    width: 30px;
    height: 30px;
    border-radius: 4px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.checkbox-box.checked,
.custom-checkbox-row.checked .checkbox-box {
    background: var(--color-blue);
    color: var(--primary-light-text);
}

.checkbox-check-icon {
    width: 12px;
    height: 12px;
    fill: none;
    stroke: #fff;
    stroke-width: 3.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    display: none;
}

.custom-checkbox-row.checked .checkbox-check-icon {
    display: block;
}

.checkbox-text {
    color: #fff;
    font-weight: 500;
}

.incoterms-group {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.incoterm-row {
    padding: 16px 20px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, .1);
    background: rgba(255, 255, 255, .03);
}

.incoterm-row.active {
    border-color: var(--color-blue);
    background: rgba(34, 115, 224, .08);
}

.incoterm-header {
    display: flex;
    gap: 12px;
    align-items: center;
    cursor: pointer;
}

.incoterm-input-area {
    display: none;
    margin-top: 14px;
}

.incoterm-row:has(.incoterm-header.active) .incoterm-input-area {
    display: block;
}

.incoterm-title {
    color: #fff;
    font-weight: 700;
}

.dimensions-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.dimension-label {
    display: block;
    margin-top: 6px;
    text-align: center;
    color: #cbd5e1;
    font-size: .8rem;
}

.calc-middle-divider {
    position: relative;
    margin: 18px 0;
    text-align: center;
    color: #fff;
    font-weight: 700;
}

.calc-middle-divider::before,
.calc-middle-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 40%;
    height: 1px;
    background: rgba(255, 255, 255, .15);
}

.calc-middle-divider::before {
    left: 0;
}

.calc-middle-divider::after {
    right: 0;
}

.assets-sidebar {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding-top: 6px;
    position: relative;
    padding-bottom: 320px;
    height: 100%;
}
.mascot-container {
    position: absolute;
    bottom: -50px;
    right: -20px;
}
.step-badge {
    width: 104px;
    height: 104px;
    border-radius: 50%;
    background: var(--primary-color);
    font-weight: 600;
    font-size: 40px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.speech-bubble {
    max-width: 280px;
    padding: 18px 26px 18px 18px;
    border-radius: 27px;
    background: var(--color-blue);
    position: relative;
    font-size: 10px;
    font-weight: 500;
    line-height: 1.3;
}

.speech-bubble::after {
    content: '';
    position: absolute;
    bottom: -10px;
    right: 45px;
    border-style: solid;
    border-width: 26px 0px 0 30px;
    border-color: var(--color-blue) transparent transparent transparent;
}

.speech-bubble.error {
    background-color: #ef4444;
}

.speech-bubble.error::after {
    border-color: #ef4444 transparent transparent transparent;
}

.calc-form-container {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.calc-footer {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 25px;
}

.btn-back {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 33px;
    padding-inline: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid #FFFFFF;
    background: transparent;
    border-radius: 10px;
    color: #fff;
    visibility: hidden;
    display: none;
}

.btn-back.visible {
    visibility: visible;
    display: flex;
}

.btn-back svg,
.btn-next svg {
    width: 12px;
    height: auto;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.btn-next {
    display: flex;
    align-items: center;
    justify-content: center;
    ;
    height: 33px;
    gap: 12px;
    padding: 6px 18px;
    background: #fff;
    color: var(--primary-dark-text);
}

.btn-next:hover {
    background: var(--color-blue);
    color: #fff;
}

.results-card {
    background: #fff;
    border-radius: 17px;
    padding: 30px;
    color: var(--primary-black-text);
}

.results-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    font-weight: 600;
    font-size: 13px;
    padding: 7px 0;
    border-bottom: 1.5px solid var(--primary-dark-color);
}

.results-row:last-of-type {
    border-bottom: 0;
}

.results-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 39px;
    padding: 7px 11px;
    margin-top: 16px;
    background: #F5F5F5;
    box-shadow: inset 0px 2px 4px rgba(0, 0, 0, 0.25);
    border-radius: 10px;
    font-weight: 600;
    font-size: 17px;
}

.results-disclaimer {
    margin-top: 14px;
    margin-bottom: 13px;
    font-size: 10px;
}

.results-actions-row {
    display: flex;
    gap: 16px;
    margin-top: 24px;
}

.btn-action-outline,
.btn-action-solid {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 33px;
    gap: 12px;
    padding: 6px 18px;
    font-size: 13px;
    width: 100%;
}

.btn-action-outline {
    background: #fff;
    color: var(--primary-dark-color);
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 33px;
    gap: 12px;
    padding: 6px 18px;
}

.btn-action-solid {
    background: var(--primary-color);
    color: var(--primary-light-text);
    font-weight: 600;
}

.res-val {
    min-width: 40px;
    text-align: right;
}

@media (max-width: 768px) {
    .calc-page {
        padding: 16px 8px;
    }

    .calc-header {
        padding: 24px;
    }

    .calc-header-title {
        font-size: 18px;
    }

    .calc-body {
        padding: 28px 20px 0;
    }

    .calc-main-row {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .assets-sidebar {
        flex-direction: column;
        justify-content: space-between;
        align-items: center;
        border-bottom: 1px solid rgba(255, 255, 255, .08);
        padding-bottom: 0;
    }

    .step-badge {
        width: 80px;
        height: 80px;
        font-size: 1.85rem;
    }

    .speech-bubble {
        max-width: 65%;
        padding: 14px 18px;
    }

    .dimensions-row {
        grid-template-columns: 1fr;
    }

    .results-actions-row {
        flex-direction: column;
    }

    .btn-action-outline,
    .btn-action-solid {
        width: 100%;
    }

    .results-total-row {
        font-size: 14px;
    }
}


@media (min-width: 998px) {
    .form-label {
        font-size: 16px;
    }

    .btn-inline,
    .speech-bubble {
        font-size: 14px;
    }
}





.uktzed-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
}

.uktzed-modal.active {
    display: flex;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    position: relative;
    border-radius: 12px;
    max-width: 560px;
    width: 92%;
    max-height: 80vh;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    animation: slideUp 0.3s ease;
    overflow: hidden;

}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 24px;
    background: var(--color-blue);
    color: white;
}

.modal-body:has(.uktzed-result-item) {
    min-height: 300px;
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 36px;
    line-height: 1;
    cursor: pointer;
    color: white;
    padding: 0 4px;
    transition: color 0.2s;
}

.modal-close:hover {
    color: var(--primary-color);
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    max-height: calc(80vh - 140px);
    background-color: white;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.modal-body .form-group {
    margin-bottom: 16px;
}

.modal-body .form-group label {
    display: block;
    font-size: 16px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 10px;
}

.uktzed-search-input {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid #000;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.uktzed-search-input:focus {
    outline: none;
    border-color: #0b2545;
    box-shadow: 0 0 0 3px rgba(11, 37, 69, 0.1);
}

.uktzed-results {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #000;
    border-radius: 6px;
    overflow-y: auto;
    z-index: 10001;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.uktzed-results:empty {
    display: none;
}

.uktzed-result-item {
    padding: 10px 14px;
    cursor: pointer;
    border-bottom: 1px solid #f3f4f6;
    transition: background 0.15s;
}

.uktzed-result-item:last-child {
    border-bottom: none;
}

.uktzed-result-item:hover,
.uktzed-result-item.active {
    background: #0b2545;
    color: #fff;
}

.uktzed-result-item .code {
    font-weight: 600;
    font-size: 16px;
    display: block;
}

.uktzed-result-item .name {
    font-size: 14px;
    color: #6b7280;
    display: block;
    margin-top: 10px;
}

.uktzed-result-item:hover .name {
    color: #000;
}

.uktzed-loading {
    text-align: center;
    padding: 20px;
    color: #6b7280;
    font-size: 14px;
}

.uktzed-loading::after {
    content: '...';
    animation: dots 1.2s steps(3) infinite;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
}

.btn-secondary {
    background: #f3f4f6;
    color: var(--primary-dark-text);
    border: 1px solid #000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    text-align: center;
    padding: 10px 35px;
    border-radius: 10px;
    line-height: 1;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: #e5e7eb;
}

.btn-primary {
    background: linear-gradient(93.43deg, #FFBA4B -5.71%, #FF9D00 78.07%);
    box-shadow: 0px 1px 4.7px 0px #00000040;
    box-shadow: 0px 2px 2.6px 0px #FFFFFF40 inset;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-dark-text);
    font-size: 18px;
    text-align: center;
    padding: 10px 35px;
    border-radius: 10px;
    line-height: 1;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid var(--primary-color);
}

.btn-primary:hover {
    background: white;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-primary:hover:not(:disabled) {
    opacity: 0.7;
}

.btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.form-group {
    position: relative;
}

.hover-tooltip {
    transition: all 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes dots {
    0% {
        content: '';
    }

    33% {
        content: '.';
    }

    66% {
        content: '..';
    }

    100% {
        content: '...';
    }
}


@media (max-width: 768px) {
    .mascot-container {
        max-width: 80%;
        position: static;
    }

    .modal-actions {
        flex-wrap: wrap;
        margin-top: 0;
        justify-content: center;
    }

    .modal-actions button {
        width: 100%;
    }

    .toggle-container {
        display: inline-flex;
        align-items: self-start;
        gap: 10px;
        justify-content: center;
        padding-top: 6px;
        flex-direction: column;
    }
}

.step-link {
    text-decoration: underline;
    cursor: pointer;
}


/*  PDF   */

.pdf-page table tbody tr:nth-child(even) td {
    background: #ffffff;
    border: none;
}

.pdf-page {

    color: #000000;
    padding: 30px;
    background: #ffffff;

    line-height: 1.45;
    box-sizing: border-box;
    font-size: 12px;

}

.pdf-page table {
    border: none;
    padding: 1px;
    border-right: 1px solid #000
}

.pdf-page,
.grid-conditions,
.pdf-table,
.pdf-footer {
    page-break-inside: avoid;
    break-inside: avoid;
}

.pdf-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 60px;
    height: min-content;
}

.pdf-logo-graphic img {
    height: 64px;
    width: auto;
    display: block;
}

.pdf-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #000000;
}

.pdf-text {
    color: #000000;
}

.pdf-header img {
    max-height: 45px;
    width: auto;
    display: block;
}

.grid-conditions {
    display: flex;
    border: 1px solid #000;
    margin-top: 40px;
}

.grid-col {
    flex: 1;
    padding: 8px 12px;
}

.grid-cell {
    color: #000000;
    font-weight: 500
}

.title-cost {
    font-weight: 600;
    font-size: 16px;
    padding-block: 40px 20px;
}

/* Table styles */
.pdf-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 5px;
    margin-bottom: 15px;
    color: #000000;
    margin-inline: 5px;
}

.pdf-table th {
    border: 1px solid #000;
    padding: 9px;
    font-weight: bold;
    text-align: center;
    color: #000000;
    background: #fff;
}
.border td{
    border: 1px solid #000 !important;
    border-top-width: 0 !important;
}
.border-full{
     border: 1px solid #000 !important;
}
.pdf-table td {
    border: 1px solid #000;
    padding: 9px;
    vertical-align: middle;
    color: #000000;
    background: #fff;
}

/* Total row formatting: no borders for labels, bordered total sum cell */
.pdf-table tr.total-row td {
    background: #fff;
    border: none;
}

.pdf-table tr.total-row td.total-value-cell {
    border: 1px solid #000;
    font-weight: bold;
    font-size: 12px;
    color: #000000;
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.sub-info-note {
    font-size: 9px;
    color: #4b5563;
    font-style: italic;
}

.disclaimer-block {
    font-size: 9px;
    line-height: 1.1;
    color: #6b7280;
    margin-bottom: 6px;
    text-align: justify;
}

.disclaimer-list {
    margin: 5px 0 15px 0;
    padding-left: 15px;
    list-style-type: disc;
}

.disclaimer-list li {
    margin-bottom: 2px;
}

.guarantee-box {
    font-size: 9px;
    margin-bottom: 20px;
}

.pdf-link {
    color: #000000;
    text-decoration: underline;
    word-break: break-all;
}

.extra-services-container {
    border: 1px solid #1c1c1c;
    padding: 12px 15px;
    margin-bottom: 30px;
}

.extra-services-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    margin-bottom: 10px;
}

.service-checkbox-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    row-gap: 6px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.square-box {
    width: 11px;
    height: 11px;
    border: 1px solid #1c1c1c;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    font-weight: bold;
}

.pdf-divider {
    border-top: 1px dashed #1c1c1c;
    margin-top: 40px;
    position: relative;
}

.pdf-divider::after {
    content: '➔';
    position: absolute;
    right: 0;
    top: -6px;
    font-size: 10px;
}
.pdf-subtext{
    font-size: 10px;
}
.pdf-footer {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-top: 30px;
    font-weight: 600;
    line-height: 120%;
    color: #000000;
}

.footer-item {
    display: flex;
    align-items: center;
    gap: 16px;
    color: #000000;
    text-decoration: none;
}

.pdf-text {
    font-weight: 500;
}

.grid-col-item {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-block: 5px;
    font-weight: 600;

}

/* Обнуляем отступы у контейнера и первого элемента inside */
.pdf-page {
    margin: 0 !important;
    padding-top: 15px !important;
    /* Уменьшаем верхний паддинг с 30px */
}

/* Убираем глобальные марджины WordPress для первого элемента */
.pdf-page>*:first-child {
    margin-top: 0 !important;
    padding-top: 0 !important;
}


@page {
    size: A4;
    margin: 0;
}

.pdf-page {
    position: relative;
    box-sizing: border-box;
    height: 296mm;
    overflow: hidden;
    padding-right: 50px;
}

.pdf-footer {
    position: absolute;
    bottom: 0px;
    padding: 30px;
    padding-right: 50px;
    left: 0;
    right: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.total-cell-label {
    border-color: #fff !important;
}

