/* ============================================================
 * About Modals — адаптивные модальные окна раздела "О сервисе"
 * PSR-12 compatible styles, mobile-first, fully responsive
 * ============================================================ */

/* ── Overlay ── */
.about-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 10500;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 16px;
    box-sizing: border-box;
}

.about-modal-overlay.is-open {
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

/* ── Modal window ── */
.about-modal {
    background: #fff;
    border-radius: 16px;
    width: 100%;
    max-width: 640px;
    margin: auto;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.18);
    position: relative;
    overflow: hidden;
    animation: aboutModalIn 0.28s ease;
}

@keyframes aboutModalIn {
    from {
        opacity: 0;
        transform: translateY(24px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ── Header ── */
.about-modal__header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 22px 24px 18px;
    border-bottom: 1px solid #f0f0f0;
    position: relative;
}

.about-modal__icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #e8f0fe;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 22px;
    line-height: 1;
}

.about-modal__title {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a2e;
    line-height: 1.3;
    flex: 1;
}

.about-modal__close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f5f5f5;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    flex-shrink: 0;
    padding: 0;
}

.about-modal__close:hover {
    background: #e0e0e0;
}

.about-modal__close::before,
.about-modal__close::after {
    content: '';
    position: absolute;
    width: 14px;
    height: 2px;
    background: #555;
    border-radius: 2px;
}

.about-modal__close::before {
    transform: rotate(45deg);
}

.about-modal__close::after {
    transform: rotate(-45deg);
}

/* ── Body ── */
.about-modal__body {
    padding: 24px;
}

/* ── Steps ── */
.about-modal__steps {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.about-modal__step {
    display: flex;
    gap: 16px;
    position: relative;
}

/* Вертикальная линия между шагами */
.about-modal__step:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 19px;
    top: 44px;
    bottom: -4px;
    width: 2px;
    background: linear-gradient(to bottom, #267ded 0%, #e8f0fe 100%);
    border-radius: 2px;
}

.about-modal__step-num {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #267ded;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
    box-shadow: 0 2px 8px rgba(38, 125, 237, 0.3);
}

.about-modal__step-content {
    flex: 1;
    padding-bottom: 24px;
}

.about-modal__step:last-child .about-modal__step-content {
    padding-bottom: 0;
}

.about-modal__step-title {
    font-size: 15px;
    font-weight: 600;
    color: #1a1a2e;
    margin: 8px 0 6px;
    line-height: 1.4;
}

.about-modal__step-text {
    font-size: 14px;
    color: #555;
    line-height: 1.6;
    margin: 0;
}

.about-modal__step-text a {
    color: #267ded;
    text-decoration: none;
}

.about-modal__step-text a:hover {
    text-decoration: underline;
}

/* ── Tip block ── */
.about-modal__tip {
    margin-top: 20px;
    padding: 14px 16px;
    background: #f0f7ff;
    border-left: 3px solid #267ded;
    border-radius: 0 8px 8px 0;
    font-size: 13px;
    color: #444;
    line-height: 1.6;
}

.about-modal__tip strong {
    color: #267ded;
}

/* ── Footer ── */
.about-modal__footer {
    padding: 16px 24px 22px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    border-top: 1px solid #f0f0f0;
}

.about-modal__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 22px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
    border: none;
    line-height: 1;
}

.about-modal__btn--primary {
    background: #267ded;
    color: #fff;
}

.about-modal__btn--primary:hover {
    background: #1a6fd4;
    color: #fff;
}

.about-modal__btn--secondary {
    background: #f0f0f0;
    color: #333;
}

.about-modal__btn--secondary:hover {
    background: #e0e0e0;
    color: #333;
}

/* ── About page links ── */
.about-info__link {
    cursor: pointer;
    transition: color 0.2s;
}

.about-info__link:hover {
    color: #267ded;
}

/* ── Responsive ── */
@media (max-width: 640px) {
    .about-modal-overlay {
        padding: 0;
        align-items: flex-end;
    }

    .about-modal {
        border-radius: 20px 20px 0 0;
        max-width: 100%;
        margin: 0;
        max-height: 92vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .about-modal__header {
        padding: 18px 18px 14px;
    }

    .about-modal__title {
        font-size: 16px;
    }

    .about-modal__body {
        padding: 18px;
    }

    .about-modal__footer {
        padding: 14px 18px 18px;
    }

    .about-modal__btn {
        flex: 1;
        min-width: 120px;
    }
}

@media (max-width: 400px) {
    .about-modal__step-title {
        font-size: 14px;
    }

    .about-modal__step-text {
        font-size: 13px;
    }

    .about-modal__step-num {
        width: 34px;
        height: 34px;
        font-size: 13px;
    }

    .about-modal__step:not(:last-child)::after {
        left: 16px;
        top: 38px;
    }
}
