:root {
    --bg: #f5f5f5;
    --card-bg: #ffffff;
    --text: #2e3138;
    --muted: #6f7580;
    --border: #d8dce3;
    --border-focus: #4e7fb8;
    --button: #3f73aa;
    --button-hover: #346799;
    --error: #d64545;
    --success-bg: #edf8ee;
    --success-border: #b7dfbc;
    --success-text: #24613a;
    --block-border: #e4e7ed;
    --block-label-bg: #f0f4f9;
    --block-label-color: #3f73aa;
}
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.tradein-section-banner {
    margin-top: 30px;
    padding: 90px 70px 130px;
    background-image: url('../../images/trade-in/bg-1.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
.tradein-section-banner .tag{
    font-weight: 600;
    font-size: 18px;
}

.tradein-section-banner-footer .title,
.tradein-section-banner .title{
    font-weight: 600;
    font-size: 30px;
}
.tradein-section-banner-footer .title .text-blue,
.tradein-section-banner .title .text-blue{
    color: #4E81B5;
}
.tradein-section-banner .description{
    margin-top: 30px;
    font-weight: 600;
    font-size: 15px;
}
.tradein-section-banner .title,
.tradein-section-banner .description{
    width: 420px;
}
.tradein-section-banner-footer .title,
.tradein-section-banner-footer .description{
    width: 420px;
    text-align: end;
    font-weight: 600;
}
.tradein-section-banner-footer .description{
    margin-top: 30px;
}
.btn-leave-request {
    margin-top: 60px;
    display: inline-flex;
    align-items: center;
    gap: 20px;
    padding: 10px 30px;
    background: #4E81B5;
    color: #ffffff;
    font-size: 20px;
    font-weight: 500;
    border: none;
    border-radius: 10px;
    cursor: pointer;
}
.tradein-section-addition,
.tradein-section-steps {
    background: var(--card-bg);
    padding: 30px 20px;
}

.tradein-section-addition .title,
.tradein-section-steps .title{
    margin: 0;
    font-size: 24px;
    font-weight: 400;
    text-align: center;
}
.tradein-section-addition .title {
}
.tradein-section-addition .wrap-addition,
.tradein-section-steps .wrap-steps{
    display: flex;
    justify-content: space-around;
    align-items: center;
    gap: 20px;
    margin-top: 30px;
}
.tradein-section-addition .item-addition,
.tradein-section-steps .item-step{
    box-shadow: 0px 2px 4px 2px #75757533;
    padding: 12px;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 15px;
    border-radius: 20px;
    flex-basis: 400px;
}
.tradein-section-steps .item-step{
    height: 170px;
}
.tradein-section-addition .item-addition{
    height: 100px;
}
.tradein-section-steps .item-step .img-wrap{
    width: 100px;
    height: 100px;
    padding: 20px;
    background: #4E81B5;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}
.tradein-section-steps .item-step .text-info .num-step{
    font-size: 26px;
    font-weight: 600;
    color: #4E81B5;
}
.tradein-section-addition .item-addition .text-info .title-addition,
.tradein-section-steps .item-step .text-info .title-step{
    font-size: 20px;
    font-weight: 600;
    line-height: 0.9;
}
.tradein-section-addition .item-addition .text-info .descr-addition,
.tradein-section-steps .item-step .text-info .descr-step{
    font-size: 14px;
    line-height: 1;
    margin-top: 10px;
}


body {
    background: var(--bg);
    font-family: Arial, sans-serif;
    color: var(--text);
    padding: 32px 16px 48px;
}

.tradein-wrap {
    max-width: 800px;
    margin: 0 auto;
}

.tradein-title {
    margin-top: 30px;
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 8px;
}

.tradein-subtitle {
    font-size: 14px;
    color: var(--muted);
    margin-bottom: 28px;
    line-height: 1.5;
}

.tradein-section-banner-footer {
    padding: 50px 70px 100px;
    background-image: url(../../images/trade-in/bg-footer-1.png);
    background-size: cover;
    /*background-position: center left;*/
    background-repeat: no-repeat;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

/* Блок */
.form-block {
    background: var(--card-bg);
    border: 1px solid var(--block-border);
    border-radius: 18px;
    overflow: hidden;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .04);
}

.form-block-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 22px;
    background: var(--block-label-bg);
    border-bottom: 1px solid var(--block-border);
    flex-wrap: wrap;
}

.form-block-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--button);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.form-block-icon svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: #fff;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.form-block-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--block-label-color);
    letter-spacing: .01em;
}

.form-block-body {
    padding: 22px;
    display: grid;
    gap: 18px;
}

/* Поля */
.form-group {
    display: grid;
    gap: 7px;
    position: relative;
}

.form-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
}

.form-group input[type=text],
.form-group input[type=tel],
.form-group input[type=email],
.form-group input[type=file],
.form-group select,
.form-group textarea {
    width: 100%;
    min-height: 52px;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
    font-size: 15px;
    line-height: 1.4;
    color: var(--text);
    outline: none;
    transition: border-color .2s, box-shadow .2s;
    appearance: none;
    -webkit-appearance: none;
}

.form-group select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236f7580' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
}

.form-group select[multiple] {
    min-height: 150px;
    background-image: none;
    padding: 10px 16px;
}

.form-group textarea {
    min-height: 110px;
    resize: vertical;
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(78, 127, 184, .13);
}

.form-group input.is-invalid, .form-group select.is-invalid, .form-group textarea.is-invalid {
    border-color: var(--error);
    box-shadow: 0 0 0 3px rgba(214, 69, 69, .08);
}

.form-hint {
    font-size: 12px;
    color: var(--muted);
    line-height: 1.4;
    width: 100%;
    margin-left: 50px;
}

.field-error {
    font-size: 10px;
    color: var(--error);
    min-height: 14px;
    position: absolute;
    bottom: -7px;
    left: 15px;
    background: #fff;
}

.form-row {
    display: grid;
    grid-template-columns:1fr 1fr;
    gap: 14px;
}
select option {
    white-space: normal;
}


/* Чекбокс */
.checkbox {
    display: grid;
    grid-template-columns:18px 1fr;
    gap: 12px;
    align-items: start;
    cursor: pointer;
    font-size: 13px;
    line-height: 1.5;
    color: var(--muted);
}

.checkbox input {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    cursor: pointer;
    accent-color: var(--button);
}

/* Успех */
.form-success {
    display: flex;
    display: none;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 20px;
    padding: 16px 18px;
    border: 1px solid var(--success-border);
    border-radius: 14px;
    background: var(--success-bg);
    color: var(--success-text);
    font-size: 14px;
    line-height: 1.5;
}

.form-success svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    stroke: var(--success-text);
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    margin-top: 1px;
}

/* Кнопка */
.submit-btn {
    width: 100%;
    min-height: 54px;
    border: 0;
    border-radius: 14px;
    padding: 14px 20px;
    background: var(--button);
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background .2s, opacity .2s, transform .15s;
    margin-top: 4px;
}

.submit-btn:hover:not(:disabled) {
    background: var(--button-hover);
}

.submit-btn:active:not(:disabled) {
    transform: translateY(1px);
}

.submit-btn:disabled {
    opacity: .45;
    cursor: not-allowed;
}

/* Спиннер на кнопке отправки */
.submit-btn--loading {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    pointer-events: none;
}
.submit-btn__spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2.5px solid rgba(255,255,255,.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: btnSpin .6s linear infinite;
    flex-shrink: 0;
}
@keyframes btnSpin {
    to { transform: rotate(360deg); }
}


@media (max-width: 1500px) {
    .tradein-section-addition .wrap-addition, .tradein-section-steps .wrap-steps {
        flex-wrap: wrap;
    }
    .tradein-section-steps .wrap-steps .item-arrow {
        display: none;
    }
    .container {
        width: 1170px;
    }
    .tradein-section-addition .wrap-addition, .tradein-section-steps .wrap-steps {
        justify-content: center;
    }
}
@media (max-width: 1200px) {
    .container {
        width: 750px;
    }
    .tradein-section-banner {
        padding: 20px 30px 80px;
    }
    .tradein-section-banner .title, .tradein-section-banner .description {
        width: 280px;
    }
    .tradein-section-banner-footer .title,
    .tradein-section-banner .title {
        font-size: 23px;
    }
    .tradein-section-banner .tag {
        font-size: 14px;
    }
    .tradein-section-addition .title, .tradein-section-steps .title {
        font-size: 18px;
        font-weight: 600;
    }
    .tradein-section-addition .item-addition,
    .tradein-section-steps .wrap-steps,
    .tradein-section-steps .item-step {
        height: auto;
        width: 100%;
        flex-basis: auto;
    }
    .tradein-section-addition .item-addition img{
        height: 50px;
    }
    .tradein-section-banner .description {
        background: #ffffffa3;
        padding: 5px 10px;
        border-radius: 10px;
        width: 100%;
    }
}
@media (max-width: 767px) {
    .container {
        width: 100%;
    }
    .btn-leave-request {
        padding: 5px 15px;
        font-size: 12px;
    }
    .tradein-section-banner {
        height: 500px;
        display: flex;
        flex-direction: column;
        align-items: center;
        background-image: url(../../images/trade-in/bg-mobi-1.png);
        min-height: 500px;
    }
    .tradein-section-banner-footer {
        padding: 0px 70px 20px;
        /*background-image: url(../../images/trade-in/bg-footer-mobi-1.png);*/
    }
    .tradein-section-banner .tag {
        display: none;
    }
    .tradein-section-banner {
        padding: 30px 30px 20px;
    }
    .tradein-section-banner .wrap-btn{
        flex-grow: 1;
        margin-top: 160px;
    }
    .tradein-section-banner .description {
        background: none;
        text-align: center;
    }
    .tradein-section-banner-footer .title,
    .tradein-section-banner-footer .description {
        width: 55%;
    }
}

/* ========== Попап .wrap-form ========== */
.wrap-form {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.wrap-form--open {
    display: flex;
}

.wrap-form__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .55);
    cursor: pointer;
}

.wrap-form__modal {
    position: relative;
    width: 100%;
    max-width: 860px;
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    background: var(--bg);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .25);
    padding: 48px 32px 32px;
    animation: wrapFormFadeIn .3s ease;
}
@keyframes wrapFormFadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

.wrap-form__close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 10px;
    background: #e8ecf2;
    color: var(--muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s, color .2s;
    z-index: 1;
}
.wrap-form__close:hover {
    background: #d8dce3;
    color: var(--text);
}

.wrap-form .tradein-wrap {
    max-width: 100%;
}

@media (max-width: 767px) {
    .wrap-form {
        padding: 0;
        align-items: flex-end;
    }
    .wrap-form__modal {
        max-width: 100%;
        max-height: 90vh;
        border-radius: 20px 20px 0 0;
        padding: 32px 16px 24px;
    }
    .wrap-form__close {
        top: 12px;
        right: 12px;
    }
}

@media (max-width: 480px) {
    .form-row {
        grid-template-columns:1fr;
    }
    .form-hint-ctrl {
        display: none;
    }
    .tradein-section-banner-footer {
        padding: 0px 20px 20px;
    }
    .tradein-section-banner-footer .title {
        font-size: 16px;
    }
    .tradein-section-banner-footer .btn-leave-request {
        margin-top: 20px;
    }
    .tradein-section-banner-footer .description {
        margin-top: 10px;
    }

}