.calculator.calc-v2,
.calc-v2 *,
.calc-v2 *::before,
.calc-v2 *::after {
    box-sizing: border-box;
}

.calc-page {
    background: linear-gradient(180deg, #FFFFFF 0%, #F7F9FC 34%, #EEF3FB 100%);
    background-attachment: fixed;
    min-height: 100vh;
}

.calculator.calc-v2 {
    background: transparent;
    padding: 8px 0 72px;
}

.calculator.calc-v2 .container {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 32px;
}

.calc-v2 .calc-tabs {
    position: relative;
    display: inline-flex;
    gap: 0;
    margin: 0 auto 28px;
    padding: 4px;
    background: #FFFFFF;
    border: 1px solid #EDEFF2;
    border-radius: 16px;
    box-shadow: 0 4px 14px rgba(13, 30, 59, .05);
}

.calc-v2 .calc-tabs-wrap {
    display: flex;
    justify-content: center;
}

.calc-v2 .calc-tabs__track {
    position: absolute;
    top: 4px;
    left: 4px;
    height: calc(100% - 8px);
    width: 0;
    border-radius: 12px;
    background: #2F6BFF;
    transition: transform .25s cubic-bezier(.4, 0, .2, 1), width .25s cubic-bezier(.4, 0, .2, 1);
    pointer-events: none;
    z-index: 0;
}

.calc-v2 .calc-tab {
    position: relative;
    z-index: 1;
    appearance: none;
    border: 0;
    background: transparent;
    cursor: pointer;
    padding: 0 26px;
    height: 48px;
    border-radius: 12px;
    font-family: inherit;
    font-size: 15.5px;
    font-weight: 500;
    color: #4B5563;
    transition: color .2s cubic-bezier(.4, 0, .2, 1);
    white-space: nowrap;
}

.calc-v2 .calc-tab:hover {
    color: #0D1E3B;
}

.calc-v2 .calc-tab.active {
    color: #FFFFFF;
    font-weight: 600;
}

.calc-v2 .calculator-section {
    background: #FFFFFF;
    border: 1px solid #EDEFF2;
    border-radius: 22px;
    box-shadow: 0 6px 24px rgba(13, 30, 59, .05);
    padding: 36px 40px 40px;
    margin: 0;
}

.calc-v2 .calc-pane[hidden] {
    display: none;
}

.calc-v2 .calculator-subtitle {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -.02em;
    color: #0D1E3B;
    margin: 0 0 26px;
    text-align: left;
}

.calc-v2 .calc-form {
    display: flex;
    flex-direction: column;
    gap: 22px;
    max-width: none;
    margin: 0;
}

.calc-v2 .calc-form__row {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    margin: 0;
    flex-wrap: nowrap;
}

.calc-v2 .calc-form__row > label {
    width: auto;
    min-width: 0;
    flex: none;
    text-align: left;
    font-size: 14.5px;
    font-weight: 500;
    color: #6B7280;
    line-height: 1.3;
    padding: 0;
    margin: 0;
}

.calc-v2 .calc-form__row--nowrap {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 16px;
}

.calc-v2 .calc-form__row--nowrap > label {
    grid-column: 1 / -1;
}

.calc-v2 .power-separator {
    display: none;
}

.calc-v2 .unit-field {
    display: flex;
    align-items: center;
    width: 100%;
    min-width: 0;
    height: 56px;
    padding: 0 18px;
    background: #FFFFFF;
    border: 1px solid #E3E8EF;
    border-radius: 14px;
    transition: border-color .15s cubic-bezier(.4, 0, .2, 1), box-shadow .15s cubic-bezier(.4, 0, .2, 1);
}

.calc-v2 .unit-field:focus-within {
    border-color: #2F6BFF;
    box-shadow: 0 0 0 3px rgba(47, 107, 255, .12);
}

.calc-v2 .unit-field input,
.calc-v2 .calc-form__row input[type="number"],
.calc-v2 .unit-field input[type="text"] {
    flex: 1;
    min-width: 0;
    width: 100%;
    height: 100%;
    border: 0;
    outline: none;
    background: transparent;
    padding: 0;
    font-family: inherit;
    font-size: 16px;
    font-weight: 500;
    color: #0D1E3B;
    box-shadow: none;
}

.calc-v2 .unit-field input::placeholder {
    color: #6B7280;
    font-weight: 400;
}

.calc-v2 .unit-label {
    flex: none;
    margin-left: 12px;
    font-size: 14px;
    font-weight: 400;
    color: #6B7280;
}

.calc-v2 .calc-form__row--url .calc-url-input,
.calc-v2 .calc-form__row .calc-url-input,
.calc-v2 input[type="text"].calc-url-input {
    box-sizing: border-box;
    width: 100%;
    height: 56px;
    min-height: 56px;
    padding: 0 18px;
    background: #FFFFFF;
    border: 1px solid #E3E8EF;
    border-radius: 14px;
    font-family: inherit;
    font-size: 16px;
    font-weight: 500;
    color: #0D1E3B;
    line-height: 54px;
    transition: border-color .15s cubic-bezier(.4, 0, .2, 1), box-shadow .15s cubic-bezier(.4, 0, .2, 1);
}

.calc-v2 .calc-form__row .calc-url-input::placeholder {
    color: #6B7280;
    font-weight: 400;
}

.calc-v2 .calc-form__row .calc-url-input:focus {
    border-color: #2F6BFF;
    box-shadow: 0 0 0 3px rgba(47, 107, 255, .12);
    outline: none;
}

.calc-v2 .calc-url-input.is-invalid,
.calc-v2 .unit-field.is-invalid,
.calc-v2 .unit-field input.is-invalid,
.calc-v2 .calc-form__row input.is-invalid {
    border-color: #EF4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, .12);
}

.calc-v2 .btn-group {
    position: relative;
    display: flex;
    width: 100%;
    padding: 4px;
    gap: 0;
    background: #F3F5F9;
    border: 0;
    border-radius: 14px;
    overflow: visible;
}

.calc-v2 .btn-group__track {
    position: absolute;
    top: 4px;
    left: 4px;
    height: calc(100% - 8px);
    width: 0;
    border-radius: 11px;
    background: #2F6BFF;
    box-shadow: 0 3px 10px rgba(47, 107, 255, .28);
    transition: transform .25s cubic-bezier(.4, 0, .2, 1), width .25s cubic-bezier(.4, 0, .2, 1);
    pointer-events: none;
    z-index: 0;
}

.calc-v2 .btn-group button {
    position: relative;
    z-index: 1;
    flex: 1;
    min-width: 0;
    appearance: none;
    border: 0;
    background: transparent;
    cursor: pointer;
    height: 48px;
    padding: 0 12px;
    border-radius: 11px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 500;
    color: #4B5563;
    transition: color .2s cubic-bezier(.4, 0, .2, 1);
}

.calc-v2 .btn-group button:hover {
    color: #0D1E3B;
    background: transparent;
}

.calc-v2 .btn-group button.active,
.calc-v2 .use-btn.active,
.calc-v2 .age-btn.active,
.calc-v2 .engine-btn.active,
.calc-v2 .country-btn.active {
    color: #FFFFFF;
    font-weight: 600;
    background: transparent;
}

.calc-v2 .btn-group button.is-invalid {
    color: #EF4444;
}

.calc-v2 .calc-form__row--engine > div {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.calc-v2 .engine-hint {
    margin: 0;
    font-size: 13.5px;
    line-height: 1.5;
    color: #6B7280;
    text-align: left;
}

.calc-v2 .calc-url-note {
    margin: 22px 0 0;
    font-size: 14.5px;
    line-height: 1.6;
    color: #6B7280;
    text-wrap: pretty;
}

.calc-v2 .calc-url-btn-wrap {
    margin-top: 24px;
}

.calc-v2 .calc-url-link,
.calc-v2 #calc-manual-btn {
    display: block;
    width: 100%;
    height: 60px;
    margin: 0;
    padding: 0 24px;
    appearance: none;
    border: 0;
    border-radius: 14px;
    background: #2F6BFF;
    box-shadow: 0 6px 18px rgba(47, 107, 255, .28);
    font-family: inherit;
    font-size: 16px;
    font-weight: 600;
    color: #FFFFFF;
    cursor: pointer;
    transition: background .15s cubic-bezier(.4, 0, .2, 1), box-shadow .15s cubic-bezier(.4, 0, .2, 1), transform .1s cubic-bezier(.4, 0, .2, 1);
}

.calc-v2 #calc-manual-btn {
    margin-top: 6px;
}

.calc-v2 .calc-url-link:hover,
.calc-v2 #calc-manual-btn:hover {
    background: #1F58E8;
    box-shadow: 0 8px 22px rgba(47, 107, 255, .34);
}

.calc-v2 .calc-url-link:active,
.calc-v2 #calc-manual-btn:active {
    transform: translateY(1px);
}

.calc-v2 .calc-url-link:disabled,
.calc-v2 #calc-manual-btn:disabled {
    background: #C7D3E8;
    box-shadow: none;
    cursor: not-allowed;
}

.calc-v2 .calc-result {
    width: calc(100vw - 64px);
    max-width: 1200px;
    margin-top: 28px;
    margin-left: calc(50% - min(50vw - 32px, 600px));
    margin-right: calc(50% - min(50vw - 32px, 600px));
}

.calc-v2 .calculator-section:has(.calc-result:not([style*="none"])) {
    padding-bottom: 0;
    border-bottom: 0;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.calc-v2 .calc-result .calc-tiles-grid,
.calc-v2 .calc-result .calc-tiles-grid--url,
.calc-v2 .calc-result .calc-tiles-grid--manual {
    max-width: none;
    margin: 0;
    gap: 16px;
}

.calc-v2 .calc-result .calc-tiles-grid,
.calc-v2 .calc-result .calc-tiles-grid--url {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.calc-v2 .calc-result .calc-tiles-grid--manual {
    grid-template-columns: repeat(2, minmax(280px, 1fr));
    max-width: 900px;
    margin: 0 auto;
}

.calc-v2 .calc-result .calc-tile {
    min-width: 0;
}

.calc-v2 .calc-result .calc-tile__photo-img {
    width: 100%;
    height: auto;
    max-width: 100%;
    border-radius: 10px;
    object-fit: cover;
    display: block;
}

.calc-v2 .calc-result .calc-tile__gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
    gap: 8px;
    margin-top: 10px;
}

.calc-v2 .calc-result .calc-tile__thumb {
    width: 100%;
    height: 48px;
    object-fit: cover;
    border-radius: 6px;
    display: block;
}

.calc-v2 .calc-result .calc-tile__total {
    overflow-wrap: anywhere;
}

.calc-faq .faq-card {
    background: #FFFFFF;
    border-radius: 22px;
    box-shadow: 0 6px 24px rgba(13, 30, 59, .05);
    padding: 0 36px;
}

.calc-faq .faq-item {
    border-bottom: 1px solid #EDEFF2;
}

.calc-faq .faq-item:last-child {
    border-bottom: 0;
}

.calc-faq .faq-q {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    width: 100%;
    padding: 26px 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
}

.calc-faq .faq-q__text {
    font-size: 17px;
    font-weight: 700;
    line-height: 1.4;
    color: #0D1E3B;
    text-wrap: pretty;
    transition: color .2s cubic-bezier(.4, 0, .2, 1);
}

.calc-faq .faq-q:hover .faq-q__text {
    color: #2F6BFF;
}

.calc-faq .faq-q__icon {
    position: relative;
    flex: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #F3F5F9;
    transition: background .2s cubic-bezier(.4, 0, .2, 1), transform .3s cubic-bezier(.4, 0, .2, 1);
}

.calc-faq .faq-q__icon::before,
.calc-faq .faq-q__icon::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 14px;
    height: 2px;
    border-radius: 1px;
    background: #0D1E3B;
    transform: translate(-50%, -50%);
    transition: background .2s cubic-bezier(.4, 0, .2, 1), transform .3s cubic-bezier(.4, 0, .2, 1), opacity .2s cubic-bezier(.4, 0, .2, 1);
}

.calc-faq .faq-q__icon::after {
    transform: translate(-50%, -50%) rotate(90deg);
}

.calc-faq .faq-item.is-open .faq-q__icon {
    background: #2F6BFF;
    transform: rotate(180deg);
}

.calc-faq .faq-item.is-open .faq-q__icon::before,
.calc-faq .faq-item.is-open .faq-q__icon::after {
    background: #FFFFFF;
}

.calc-faq .faq-item.is-open .faq-q__icon::after {
    transform: translate(-50%, -50%) rotate(0deg);
    opacity: 0;
}

.calc-faq .faq-a {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows .32s cubic-bezier(.4, 0, .2, 1);
}

.calc-faq .faq-a__inner {
    overflow: hidden;
    min-height: 0;
}

.calc-faq .faq-a__text {
    font-size: 16px;
    line-height: 1.7;
    color: #6B7280;
    padding: 0 60px 26px 0;
    text-wrap: pretty;
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity .24s cubic-bezier(.4, 0, .2, 1), transform .24s cubic-bezier(.4, 0, .2, 1);
}

.calc-faq .faq-item.is-open .faq-a {
    grid-template-rows: 1fr;
}

.calc-faq .faq-item.is-open .faq-a__text {
    opacity: 1;
    transform: translateY(0);
    transition-delay: .06s;
}

@media (prefers-reduced-motion: reduce) {
    .calc-faq .faq-a,
    .calc-faq .faq-a__text,
    .calc-faq .faq-q__icon,
    .calc-faq .faq-q__icon::before,
    .calc-faq .faq-q__icon::after {
        transition: none;
    }
}

@media (max-width: 768px) {
    .calculator.calc-v2 .container {
        padding: 0 16px;
    }

    .calc-v2 .calculator-section {
        padding: 26px 20px 30px;
        border-radius: 18px;
    }

    .calc-v2 .calc-tabs {
        width: 100%;
    }

    .calc-v2 .calc-tab {
        flex: 1;
        padding: 0 12px;
        font-size: 14.5px;
    }

    .calc-v2 .btn-group button {
        font-size: 13.5px;
        padding: 0 6px;
    }

    .calc-v2 .calc-form__row--nowrap {
        grid-template-columns: 1fr;
    }

    .calc-faq .faq-card {
        padding: 0 20px;
        border-radius: 18px;
    }

    .calc-faq .faq-q__text {
        font-size: 16px;
    }

    .calc-faq .faq-a__text {
        padding-right: 0;
        font-size: 15.5px;
    }

    .calc-v2 .calc-result {
        width: auto;
        margin-left: 0;
        margin-right: 0;
    }

    .calc-v2 .calc-result .calc-tiles-grid,
    .calc-v2 .calc-result .calc-tiles-grid--url,
    .calc-v2 .calc-result .calc-tiles-grid--manual {
        grid-template-columns: 1fr;
    }
}
