/* post.css - Instagram-inspired post page */

.post-page {
    margin: 0;
    padding: 0;
    padding-top: 72px;
    min-height: 100vh;
    background: #fafafa;
    font-family: BlinkMacSystemFont, -apple-system, "Segoe UI", Roboto, sans-serif;
    color: #262626;
    -webkit-font-smoothing: antialiased;
}

.post-container {
    max-width: 967px;
    margin: 0 auto;
    padding: 28px 16px 56px;
    box-sizing: border-box;
}

.post-card {
    display: grid;
    grid-template-columns: minmax(0, 600fr) minmax(0, 335fr);
    aspect-ratio: 935 / 600;
    background: #fff;
    border: 1px solid #dbdbdb;
    overflow: hidden;
}

.post-card__image {
    min-width: 0;
    min-height: 0;
    display: flex;
    align-items: stretch;
    justify-content: center;
    background: #fff;
}

.post-card__image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
    background: #fff;
}

.post-card__sidebar {
    min-width: 0;
    min-height: 0;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    border-left: 1px solid #efefef;
    background: #fff;
}

.post-card__header {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 60px;
    padding: 14px 16px;
    border-bottom: 1px solid #efefef;
    box-sizing: border-box;
}

.post-card__author {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #262626;
    flex: 0 1 auto;
    min-width: 0;
}

.post-card__avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    margin-right: 12px;
    border: 1px solid #efefef;
    object-fit: cover;
    background: #fff;
}

.post-card__avatar--text {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-family: Georgia, serif;
    font-size: 30px;
    font-weight: 700;
    color: #a3a3a3;
    font-style: italic;
}

.post-card__author-name {
    font-size: 14px;
    font-weight: 600;
}

.post-card__header-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-right: auto;
    font-size: 14px;
    min-width: 0;
}

.post-card__header-separator {
    color: #595959;
    line-height: 1;
}

.post-card__follow {
    color: #0064b5;
    font-weight: 600;
    white-space: nowrap;
}

.post-card__more {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #262626;
}

.post-card__body {
    min-height: 0;
    overflow-y: auto;
    padding: 16px;
    box-sizing: border-box;
    scrollbar-width: thin;
}

.post-card__content {
    margin: 0;
}

.post-card__text-block {
    font-size: 14px;
    line-height: 1.48;
    color: #262626;
    word-break: break-word;
}

.post-card__author-inline {
    font-weight: 600;
    margin-right: 6px;
}

.post-card__date {
    display: block;
    margin-top: 12px;
    font-size: 10px;
    color: #595959;
    text-transform: uppercase;
    letter-spacing: 0.18em;
}

.post-card__comments {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #efefef;
}

.post-card__comment {
    margin-bottom: 14px;
    font-size: 14px;
    line-height: 1.45;
}

.post-card__comment-author {
    font-weight: 600;
    margin-right: 6px;
}

.post-card__comment-text {
    color: #262626;
}

.post-card__comment-date {
    display: block;
    margin-top: 4px;
    font-size: 11px;
    color: #595959;
}

.post-card__footer {
    border-top: 1px solid #efefef;
    padding: 0 16px;
    box-sizing: border-box;
}

.post-card__actions {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 8px 0 6px;
}

.post-card__like-btn,
.post-card__comment-btn,
.post-card__share-btn,
.post-card__save-btn {
    background: none;
    border: none;
    padding: 8px 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    color: #262626;
}

.post-card__save-btn {
    margin-left: auto;
}

.post-card__like-btn:hover svg,
.post-card__comment-btn:hover svg,
.post-card__share-btn:hover svg,
.post-card__save-btn:hover svg,
.post-card__more:hover svg {
    opacity: 0.65;
}

.post-card__like-btn.is-liked svg {
    fill: #b44;
    stroke: #b44;
    animation: like-pop 0.3s ease;
}

@keyframes like-pop {
    0% { transform: scale(1); }
    50% { transform: scale(1.16); }
    100% { transform: scale(1); }
}

.post-card__like-count {
    padding-bottom: 10px;
    font-size: 14px;
    font-weight: 600;
    color: #262626;
}

.post-card__catalog-link {
    display: inline-block;
    margin-bottom: 12px;
    font-size: 13px;
    font-weight: 600;
    color: #262626;
    text-decoration: none;
}

.post-card__catalog-link:hover {
    opacity: 0.65;
}

.post-card__back-btn {
    display: block;
    margin-bottom: 12px;
    padding: 0;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    color: #262626;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
}

.post-card__back-btn:hover {
    opacity: 0.65;
}

.post-card__add-comment {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 0;
    border-top: 1px solid #efefef;
}

.post-card__comment-input {
    flex: 1;
    border: none;
    outline: none;
    padding: 0;
    background: transparent;
    font: inherit;
    font-size: 14px;
    color: #262626;
}

.post-card__comment-input::placeholder {
    color: #595959;
}

.post-card__comment-submit {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #0095f6;
    opacity: 0.3;
    transition: opacity 0.2s ease;
}

.post-card__comment-submit:not(:disabled) {
    opacity: 1;
}

.post-card__comment-submit:not(:disabled):hover {
    opacity: 0.7;
}

.post-card__login-hint {
    padding: 16px 0 18px;
    border-top: 1px solid #efefef;
    font-size: 14px;
    line-height: 1.45;
    color: #595959;
}

@media (max-width: 768px) {
    .post-page {
        padding-top: 44px;
    }

    .post-container {
        max-width: none;
        padding: 0 0 36px;
    }

    .post-card {
        display: block;
        aspect-ratio: auto;
        border-left: none;
        border-right: none;
    }

    .post-card__image {
        aspect-ratio: 1;
    }

    .post-card__image img {
        object-fit: contain;
    }

    .post-card__sidebar {
        display: block;
        border-left: none;
    }

    .post-card__body {
        overflow: visible;
    }

    .post-card__header,
    .post-card__body,
    .post-card__footer {
        padding-left: 14px;
        padding-right: 14px;
    }
}

/* More menu overlay */
.post-more-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.65);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.post-more-menu {
    background: #fff;
    border-radius: 12px;
    width: 400px;
    max-width: 90vw;
    overflow: hidden;
}

.post-more-menu button,
.post-more-menu a button {
    display: block;
    width: 100%;
    padding: 14px 0;
    border: none;
    background: none;
    font-size: 14px;
    color: #262626;
    cursor: pointer;
    text-align: center;
    border-bottom: 1px solid #efefef;
}

.post-more-menu button:last-child {
    border-bottom: none;
}

.post-more-menu button:hover {
    background: #fafafa;
}

.post-more-menu a {
    text-decoration: none;
}

.post-more-menu__cancel {
    font-weight: 600;
}
