/* ===== POST PAGE (COLLECTION) ===== */
.post-col {
    max-width: 468px;
    margin: 0 auto;
    padding: 0;
}

.full-bleed {
    width: 100vw;
    margin-left: calc(50% - 50vw);
}

.post-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 14px;
    line-height: 20px;
    color: var(--text-tertiary);
    padding-top: 24px;
}

.post-meta .posted {
    color: var(--text-primary);
}

.post-title {
    font-size: 28px;
    line-height: 1.15;
    text-align: center;
    font-weight: 400;
    margin: 14px 0 18px;
}

/* ===== SLIDER ===== */
.slider {
    overflow: hidden;
    cursor: grab;
    user-select: none;
    margin-bottom: 18px;
}

.slider:active {
    cursor: grabbing;
}

.slider__track {
    display: flex;
    gap: 24px;
    width: max-content;
    will-change: transform;
}

.slider__slide {
    height: 60vh;
    aspect-ratio: 340/572;
    flex: none;
    border-radius: 8px;
    overflow: hidden;
    background-size: cover;
    background-position: center;
}

/* ===== TAGS (CHIPS) ===== */
.mt-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 16px 0;
}

.mt-tag {
    height: 32px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    border-radius: 8px;
    font-size: 14px;
    line-height: 14px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    cursor: pointer;
    transition: background-color .12s ease;
}

.mt-tag:hover {
    background: var(--bg-tertiary);
}

.mt-tag:active {
    background: transparent;
}

/* ===== USER RATE ===== */
.mt-user-rate-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 8px 0 4px;
}

.mt-user-rate-title {
    font-size: 25px;
    line-height: 1.15;
    font-weight: 400;
}

.rate {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 96px;
    height: 60px;
    border-radius: 8px;
    font-family: var(--font-display);
    font-size: 55px;
    line-height: .9;
    letter-spacing: .5px;
    color: var(--neutral-900);
    flex: none;
    overflow: hidden;
}

.rate.r10 { background: var(--accent-500); }
.rate.r9 { background: var(--accent-400); }
.rate.r8 { background: var(--accent-300); }
.rate.r7 { background: var(--accentcard-7); }
.rate.r6 { background: var(--accentcard-6); }
.rate.r5 { background: var(--accentcard-5); }
.rate.r4 { background: var(--accentcard-4); }
.rate.r3 { background: var(--accentcard-3); }
.rate.r2 { background: var(--accentcard-2); }
.rate.r1 { background: var(--accentcard-1); }

/* ===== REVIEW ===== */
.mt-review-section {
    padding: 18px 0 8px;
}

.mt-review-title {
    font-size: 25px;
    line-height: 1.15;
    font-weight: 400;
    margin-bottom: 12px;
}

.mt-review-text {
    font-size: 16px;
    line-height: 24px;
    color: var(--text-primary);
    word-break: break-all;
}

.mt-review-text p {
    margin-bottom: 14px;
}

/* ===== COMMENTS ===== */
.cmt-section {
    padding: 24px 0 8px;
}

.cmt-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-subtle);
    padding-bottom: 14px;
}

.cmt-head h2 {
    font-size: 25px;
    line-height: 1.15;
    font-weight: 400;
}

.cmt-count {
    font-size: 25px;
    color: var(--text-tertiary);
}

.cmt-input-wrap {
    margin: 16px 0 24px;
    border: 1px solid var(--border-default);
    border-radius: 12px;
    padding: 12px 14px;
    background: var(--bg-primary);
    transition: transform .26s cubic-bezier(.4,0,.2,1), box-shadow .26s ease, padding .26s ease, border-color .2s ease, background-color .2s ease;
}

.cmt-input-wrap .who {
    font-size: 14px;
    line-height: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.cmt-field {
    display: flex;
    align-items: flex-end;
    gap: 10px;
}

.cmt-textarea {
    flex: 1;
    border: none;
    outline: none;
    resize: none;
    background: transparent;
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 24px;
    color: var(--text-primary);
    max-height: 168px;
    min-height: 24px;
    overflow-y: auto;
}

.cmt-textarea::placeholder {
    color: var(--text-tertiary);
}

.cmt-send {
    display: none;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--accent-500);
    flex: none;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
}

.cmt-send svg {
    width: 20px;
    height: 20px;
}

/* ДЕСКТОП: показываем кнопку сразу при наличии текста */
@media (min-width: 601px) {
    .cmt-input-wrap.has-text .cmt-send {
        display: flex;
    }
}

/* МОБИЛЬНЫЕ: показываем кнопку только при фокусе и наличии текста */
@media (max-width: 600px) {
    .cmt-input-wrap.has-text .cmt-send {
        display: flex;
        animation: fadeIn 0.2s ease;
    }
    
    .cmt-input-wrap.focused {
        position: fixed;
        left: 8px;
        right: 8px;
        bottom: 8px;
        z-index: 90;
        border-color: transparent;
        background: var(--bg-secondary);
        padding: 14px 16px;
        box-shadow: 0 -6px 24px rgba(30,30,30,.14);
        animation: cmtUp .28s cubic-bezier(.4,0,.2,1);
    }
    
    @keyframes cmtUp {
        from { transform: translateY(24px); }
        to { transform: translateY(0); }
    }
    
    @keyframes fadeIn {
        from {
            opacity: 0;
            transform: scale(0.8);
        }
        to {
            opacity: 1;
            transform: scale(1);
        }
    }
}

.cmt-list {
    display: flex;
    flex-direction: column;
}

.cmt {
    padding: 14px 0;
    border-bottom: 1px solid var(--border-subtle);
}

.cmt-top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 6px;
}

.cmt-user {
    font-size: 14px;
    line-height: 18px;
    font-weight: 600;
}

.cmt-date {
    font-size: 14px;
    line-height: 18px;
    color: var(--text-tertiary);
    white-space: nowrap;
}

.cmt-text {
    font-size: 16px;
    line-height: 24px;
    color: var(--text-primary);
    word-break: break-all;
}

.mt-no-comments {
    text-align: center;
    padding: 40px;
    color: var(--text-tertiary);
    background: var(--bg-secondary);
    border-radius: 12px;
}

.mt-no-comments p {
    margin: 0;
    font-size: 15px;
}

/* ===== OTHER USER REVIEW ===== */
.other-head {
    font-size: 25px;
    line-height: 1.15;
    font-weight: 400;
    text-align: left;
    margin: 8px 0 20px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 600px) {
    .post-title {
        font-size: 24px;
    }
    
    /* Sticky comment input above keyboard */
    .cmt-input-wrap.focused {
        position: fixed;
        left: 8px;
        right: 8px;
        bottom: 8px;
        z-index: 90;
        border-color: transparent;
        background: var(--bg-secondary);
        padding: 14px 16px;
        box-shadow: 0 -6px 24px rgba(30,30,30,.14);
        animation: cmtUp .28s cubic-bezier(.4,0,.2,1);
    }
    
    @keyframes cmtUp {
        from { transform: translateY(24px); }
        to { transform: translateY(0); }
    }
    
    .cmt-input-wrap.collapsed {
        border-color: transparent;
        background: var(--bg-secondary);
    }
    
    .cmt-input-wrap.collapsed .cmt-textarea {
        max-height: 24px;
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
    }
}

/* Показываем кнопку, если в textarea есть текст */
/*
.cmt-input-wrap textarea:not(:placeholder-shown) ~ .cmt-send {
    display: flex;
}
    */

.cmt-send {
    display: none;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--accent-500);
    flex: none;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.cmt-input-wrap.has-text .cmt-send {
    display: flex;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}