/* Карточка ребёнка (ChildDetail): новый вид.
   Действует только внутри <section class="child-layout child-v2">, подключается после detail.css.
   Чтобы вернуть прежний вид, достаточно убрать класс child-v2 из ChildDetail.blade.php.
   Сама форма пожертвования оформлена в payform.css. */

.child-layout.child-v2 {
    background: #fff9f4;
    padding: 44px 0 64px;
    font-family: 'Montserrat', sans-serif;
    color: #2b2118;
}

.child-v2 .child-grid {
    gap: 28px;
}

/* ===== КАРТОЧКИ ===== */
.child-v2 .gallery-card,
.child-v2 .content-card,
.child-v2 .sidebar-card {
    border-radius: 24px;
    box-shadow: 0 20px 50px rgba(43, 33, 24, 0.08);
}

.child-v2 .gallery-card {
    padding: 24px;
}

/* карточка формы пожертвования (.donation__pay) оформлена в payform.css, здесь её не трогаем */
.child-v2 .content-card:not(.donation__pay) {
    padding: 32px;
    margin-top: 28px;
}

/* ===== ГАЛЕРЕЯ ===== */
.child-v2 .child-head {
    margin-bottom: 18px;
    font-size: 26px;
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: .01em;
    color: #2b2118;
}

.child-v2 .gallery-swiper img {
    border-radius: 16px;
}

.child-v2 .gallery-swiper .swiper-button-next,
.child-v2 .gallery-swiper .swiper-button-prev {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 44px !important;
    height: 44px !important;
    margin-top: -22px !important;
    padding: 0 !important;
    border-radius: 50% !important;
    background-color: #fff !important;
    color: #2b2118 !important;
    box-shadow: 0 6px 18px rgba(43, 33, 24, 0.22);
    opacity: .92;
}

.child-v2 .gallery-swiper .swiper-button-next::after,
.child-v2 .gallery-swiper .swiper-button-prev::after {
    margin: 0;
    font-size: 16px;
    font-weight: 800;
}

.child-v2 .gallery-swiper .swiper-button-next.swiper-button-disabled,
.child-v2 .gallery-swiper .swiper-button-prev.swiper-button-disabled {
    opacity: .35 !important;
}

/* ===== ИСТОРИЯ ===== */
.child-v2 .tabs {
    margin-bottom: 16px;
}

.child-v2 .tab,
.child-v2 .tab.active {
    padding: 0 0 8px;
    font-family: inherit;
    font-size: 22px;
    font-weight: 800;
    color: #2b2118;
}

.child-v2 .tab.active {
    border-bottom: 3px solid #FF6711;
}

.child-v2 .tab-content {
    font-size: 16px;
    line-height: 1.75;
    color: #4b4239;
}

.child-v2 .tab-content p {
    margin: 0 0 14px;
}

.child-v2 .tab-content img {
    max-width: 100%;
    height: auto;
    border-radius: 14px;
}

.child-v2 .tab-content a {
    color: #FF6711;
}

/* ===== БОКОВАЯ ПАНЕЛЬ ===== */
.child-v2 .sidebar-card {
    padding: 28px;
}

.child-v2 .sidebar-card h2 {
    margin: 0 0 6px;
    font-size: 30px;
    font-weight: 800;
    line-height: 1.15;
    color: #2b2118;
}

.child-v2 .sidebar-meta {
    margin-bottom: 22px;
    font-size: 15px;
    color: #8a7f75;
}

.child-v2 .sidebar-card .sidebar-block {
    margin-bottom: 20px;
}

.child-v2 .sidebar-block > span {
    display: block;
    margin-bottom: 6px;
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #8a7f75;
}

.child-v2 .sidebar-block p {
    margin: 0 0 8px;
    font-size: 16px;
    line-height: 1.6;
    color: #2b2118;
}

/* Документы: чипы */
.child-v2 .docs-grid {
    flex-direction: row;
    gap: 8px;
    margin-top: 8px;
}

.child-v2 .sidebar-card .doc-item {
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 10px;
    background: #f7f3ef;
    font-size: 14px;
    color: #3d342c;
    transition: background .2s ease, color .2s ease;
}

.child-v2 .sidebar-card .doc-item:hover {
    background: #fff0e6;
    color: #FF6711;
}

.child-v2 .sidebar-card .doc-item p {
    margin: 0;
    font-size: 14px;
    line-height: 1.3;
}

/* Прогресс сбора */
.child-v2 .sidebar-card .progress {
    height: 12px;
    margin: 6px 0 12px;
    border-radius: 999px;
    background: #f3ece5;
}

.child-v2 .progress__bar {
    border-radius: 999px;
    background: linear-gradient(90deg, #ff9a52, #FF6711);
}

.child-v2 .sidebar-card .progress__info {
    margin-bottom: 4px;
    font-size: 13px;
    color: #8a7f75;
}

.child-v2 .sidebar-card .progress__info span b {
    font-size: 18px;
    font-weight: 800;
    color: #2b2118;
}

/* Кнопки */
.child-v2 .btn-main {
    padding: 17px 16px;
    border-radius: 14px;
    background: #FF6711;
    font-size: 17px;
    font-weight: 700;
    transition: background .2s ease, box-shadow .2s ease, transform .1s ease;
}

.child-v2 .btn-main:hover {
    background: #f05a05;
    box-shadow: 0 10px 25px rgba(255, 103, 17, 0.35);
}

.child-v2 .btn-main:active {
    transform: translateY(1px);
}

.child-v2 .btn-outline {
    margin-top: 10px;
    padding: 15px 16px;
    border: 1.5px solid #e8e1da;
    border-radius: 14px;
    color: #3d342c;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: border-color .2s ease, color .2s ease, background .2s ease;
}

.child-v2 .btn-outline:hover {
    border-color: #FF6711;
    background: #fff6f0;
    color: #FF6711;
}

/* ===== КОММЕНТАРИИ ===== */
.child-v2 .comment-title {
    margin-bottom: 22px;
}

.child-v2 .comment-title h4 {
    margin: 0;
    font-family: inherit;
    font-size: 22px;
    font-weight: 800;
    color: #2b2118;
}

.child-v2 .comments .comment-list li:not(:last-child) {
    margin-bottom: 14px;
}

.child-v2 .comment-box {
    gap: 16px;
    padding: 18px 20px;
    border: 1px solid #f1e9e1;
    border-radius: 16px;
    background: #fcfaf8;
    box-shadow: none;
}

.child-v2 .comment-box .comment-avatar {
    float: none;
    flex: 0 0 auto;
    margin-right: 0;
}

.child-v2 .comment-box .comment-avatar img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    background: #fff;
}

.child-v2 .comment-box .comment-text {
    min-width: 0;
}

.child-v2 .comment-box .comment-text .avatar-name h5 {
    margin: 0 0 4px;
    font-family: inherit;
    font-size: 16px;
    font-weight: 700;
    color: #2b2118;
}

.child-v2 .comment-box .comment-text p {
    font-size: 15px;
    line-height: 1.6;
    color: #4b4239;
    overflow-wrap: anywhere;
}

/* Форма комментария: те же поля, что в форме заявки */
.child-v2 .post-comment-form {
    margin-top: 32px;
}

.child-v2 .post-comment-form input,
.child-v2 .post-comment-form textarea {
    height: 52px;
    margin-bottom: 14px;
    padding: 0 16px;
    border: 1.5px solid #e8e1da;
    border-radius: 12px;
    background: #fff;
    box-shadow: none;
    font-family: inherit;
    font-size: 15px;
    color: #2b2118;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.child-v2 .post-comment-form textarea {
    height: 150px;
    padding: 14px 16px;
    resize: vertical;
}

.child-v2 .post-comment-form input:hover,
.child-v2 .post-comment-form textarea:hover {
    border-color: #d8cec4;
}

.child-v2 .post-comment-form input:focus,
.child-v2 .post-comment-form textarea:focus {
    outline: none;
    border-color: #FF6711;
    box-shadow: 0 0 0 4px rgba(255, 103, 17, 0.14);
}

.child-v2 .post-comment-form input::placeholder,
.child-v2 .post-comment-form textarea::placeholder {
    color: #b3a9a0;
    font-size: 15px;
}

.child-v2 .leave-comments {
    display: inline-block;
    margin-top: 0;
    padding: 15px 38px;
    border-radius: 14px;
    background: #FF6711;
    font-family: inherit;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s ease, box-shadow .2s ease;
}

.child-v2 .leave-comments:hover {
    background: #f05a05;
    box-shadow: 0 10px 25px rgba(255, 103, 17, 0.35);
}

/* ===== ПЛАНШЕТ И ТЕЛЕФОН ===== */
@media (max-width: 993px) {
    .child-layout.child-v2 {
        padding: 16px 0 36px;
    }

    .child-v2 .gallery-card {
        padding: 16px;
        border-radius: 24px 24px 0 0;
    }

    /* на телефоне галерея листается свайпом, стрелки скрыты, как и раньше */
    .child-v2 .gallery-swiper .swiper-button-next,
    .child-v2 .gallery-swiper .swiper-button-prev {
        display: none !important;
    }

    .child-v2 .content-card:not(.donation__pay) {
        padding: 20px 16px;
        margin-top: 16px;
        border-radius: 20px;
    }

    .child-v2 .child-head {
        margin-bottom: 12px;
        font-size: 20px;
        text-align: center;
    }

    /* верхняя карточка с именем и сбором продолжает галерею */
    .child-v2 .sidebar-card {
        padding: 6px 16px 20px;
        border-radius: 0 0 24px 24px;
    }

    .child-v2 .sidebar-card h2 {
        font-size: 24px;
    }

    .child-v2 .sidebar-meta {
        margin-bottom: 16px;
    }

    .child-v2 .sidebar-block p {
        font-size: 15px;
    }

    .child-v2 .sidebar-block > span {
        font-size: 12px;
    }

    .child-v2 .tab,
    .child-v2 .tab.active {
        font-size: 20px;
    }

    .child-v2 .tab-content {
        font-size: 15px;
        line-height: 1.7;
    }

    .child-v2 .comment-box {
        display: flex;
        padding: 14px;
        gap: 12px;
    }

    .child-v2 .comment-box .comment-avatar img {
        width: 40px;
        height: 40px;
    }

    .child-v2 .leave-comments {
        display: block;
        width: 100%;
    }
}
