/* Posts Page Styles */

.floating-input-container textarea:focus {
    border-color: var(--c6) !important;
}

.post-content {
    color: var(--c10);
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
    padding: 10px;
    transition: font-size 0.2s ease;
}

/* Dynamic font sizes based on content length */
.post-content.size-xs { font-size: 32px; } /* 0-50 chars */
.post-content.size-sm { font-size: 24px; } /* 51-100 chars */
.post-content.size-md { font-size: 18px; } /* 101-200 chars */
.post-content.size-lg { font-size: 16px; } /* 201-350 chars */
.post-content.size-xl { font-size: 14px; } /* 351-500 chars */

.post-author {
    padding: 5px;
    background: var(--c2);
    border-bottom: 1px solid var(--c3);
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.post-profile-image {
    height: 32px;
    width: 32px;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--c5);
    cursor: pointer;
}

.post-author-link {
    color: var(--c10);
}

.post-actions {
    display: flex;
    gap: 15px;
    padding: 10px 15px;
    background: var(--c2);
    border-bottom: 1px solid var(--c3);
    align-items: center;
}

.post-action-btn {
    background: transparent;
    border: none;
    color: var(--c9);
    cursor: pointer;
    font-size: 14px;
    padding: 5px 10px;
    border-radius: 4px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.post-action-btn:hover {
    background: var(--c3);
    color: var(--c11);
}

.post-action-btn.liked {
    color: #f44336;
    font-weight: bold;
}

.post-date {
    color: var(--c7);
    font-size: 12px;
    margin-left: 10px;
}

.delete-post-btn {
    margin-left: auto;
    color: #f44336;
}

.comments-section {
    padding: 0;
    background: var(--c1);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, padding 0.3s ease-out;
    will-change: max-height;
}

.comments-section:nth-child(even) .comment-item {
    margin-bottom: 5px;
}

.comments-section.expanded {
    max-height: 2000px;
    padding: 5px;
    transition: max-height 0.5s ease-in, padding 0.3s ease-in;
}

.comments-list {
    min-height: 40px;
}

.comments-list:empty::after {
    content: 'Loading comments...';
    display: block;
    text-align: center;
    padding: 15px;
    color: var(--c8);
    font-size: 14px;
}

.see-more-comments-btn {
    width: 100%;
    padding: 8px;
    margin-bottom: 10px;
    background: var(--c2);
    border: 1px solid var(--c3);
    color: var(--c9);
    cursor: pointer;
    border-radius: 4px;
    font-size: 13px;
    transition: all 0.2s;
    text-align: center;
}

.see-more-comments-btn:hover {
    background: var(--c3);
    color: var(--c11);
}

.see-more-comments-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.comments-loading {
    text-align: center;
    color: var(--c7);
}

.comments-error {
    text-align: center;
    color: #f44336;
}

.comment-item {
    background: var(--c2);
    border: 1px solid var(--c3);
    border-radius: 4px;
    overflow: hidden;
}

.comment-author {
    padding: 8px 15px;
    background: var(--c2);
    border-bottom: 1px solid var(--c3);
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.comment-profile-image {
    height: 28px;
    width: 28px;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--c5);
    cursor: pointer;
}

.comment-author-link {
    color: var(--c10);
}

.comment-content {
    color: var(--c9);
    line-height: 1.5;
    white-space: pre-wrap;
    word-wrap: break-word;
    padding: 12px 15px;
}

.comment-actions {
    display: flex;
    gap: 10px;
    padding: 8px 15px;
    background: var(--c2);
    border-top: 1px solid var(--c3);
    align-items: center;
    font-size: 12px;
}

.comment-action-btn {
    background: transparent;
    border: none;
    color: var(--c9);
    cursor: pointer;
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 4px;
}

.comment-action-btn:hover {
    background: var(--c3);
    color: var(--c11);
}

.comment-action-btn.liked {
    color: #f44336;
    font-weight: bold;
}

.comment-time {
    font-size: 11px;
    color: var(--c7);
    margin-left: 5px;
}

.comment-delete-btn {
    background: transparent;
    border: none;
    color: #f44336;
    cursor: pointer;
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 4px;
    margin-left: auto;
    transition: all 0.2s;
}

.comment-delete-btn:hover {
    background: rgba(244, 67, 54, 0.1);
}

.comment-form {
    margin-top: 5px;
    padding-top: 5px;
    border-top: 1px solid var(--c3);
    position: relative;
}

.comment-form .floating-input-container {
    width: 100%;
}

.comment-input {
    width: 100%;
    resize: vertical;
    min-height: 60px;
    padding: 16px 50px 8px 12px;
    border: 1px solid var(--c3);
    border-radius: 4px;
    font-size: 16px;
    background: var(--c2);
    color: var(--c11);
    outline: none;
    transition: border-color 0.2s ease;
    font-family: inherit;
}

.comment-label {
    position: absolute;
    left: 12px;
    top: 11px;
    color: var(--c5);
    font-size: 16px;
    pointer-events: none;
    transition: all 0.2s ease;
    background: var(--c2);
    padding: 0 4px;
}

.comment-submit {
    position: absolute;
    right: 5px;
    bottom: 5px;
    margin: 0;
    padding: 8px 12px;
    min-width: auto;
    z-index: 10;
    cursor: pointer;
}

/* Create post form */
.create-post-container {
    position: relative;
}

.create-post-textarea {
    width: 100%;
    resize: vertical;
    min-height: 80px;
    padding: 16px 80px 8px 12px;
    border: 1px solid var(--c3);
    border-radius: 4px;
    font-size: 16px;
    background: var(--c2);
    color: var(--c11);
    outline: none;
    transition: all 0.2s ease;
    font-family: inherit;
}

.create-post-label {
    position: absolute;
    left: 12px;
    top: 11px;
    color: var(--c5);
    font-size: 16px;
    pointer-events: none;
    transition: all 0.2s ease;
    background: var(--c2);
    padding: 0 4px;
}

.create-post-btn {
    cursor: pointer;
    position: absolute;
    right: 15px;
    bottom: 15px;
    z-index: 10;
    min-width: auto;
}

.create-post-message {
    margin-top: 10px;
    display: none;
}

