/* Simple Facebook-Style Create Post CSS */

.create-post {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    padding: 16px;
    transition: box-shadow 0.2s ease;
}

.create-post:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.12);
}

/* Header */
.create-post-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.create-post-input {
    flex: 1;
    background: #f0f2f5;
    border-radius: 24px;
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.create-post-input:hover {
    background: #e4e6eb;
}

.placeholder-text {
    color: #65676b;
    font-size: 16px;
}

/* Expanded Form */
.create-post-expanded {
    border-top: 1px solid #e4e6eb;
    padding-top: 16px;
    margin-top: 16px;
    animation: expandDown 0.3s ease;
}

@keyframes expandDown {
    from {
        opacity: 0;
        max-height: 0;
        padding-top: 0;
        margin-top: 0;
    }
    to {
        opacity: 1;
        max-height: 500px;
        padding-top: 16px;
        margin-top: 16px;
    }
}

/* Image Preview */
.image-preview-section {
    margin-bottom: 12px;
    animation: slideDown 0.3s ease;
}

.image-preview-container {
    position: relative;
    border: 1px solid #e4e6eb;
    border-radius: 12px;
    overflow: hidden;
}

.image-preview {
    width: 100%;
    max-height: 300px;
    object-fit: cover;
    display: block;
}

.remove-image-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.remove-image-btn:hover {
    background: rgba(0, 0, 0, 0.8);
}

/* Text Area */
.post-textarea {
    width: 100%;
    min-height: 60px;
    max-height: 200px;
    border: none;
    outline: none;
    resize: none;
    font-size: 16px;
    font-family: inherit;
    line-height: 1.4;
    margin-bottom: 12px;
    background: transparent;
}

.post-textarea::placeholder {
    color: #8a8d91;
}

/* Selected Emotion */
.selected-emotion {
    background: #f0f2f5;
    border-radius: 8px;
    padding: 8px 12px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #1c1e21;
}

.selected-emotion .emotion-icon {
    font-size: 18px;
}

.remove-selected-emotion {
    margin-left: auto;
    background: none;
    border: none;
    color: #8a8d91;
    cursor: pointer;
    padding: 2px;
}

/* Category Row */
.category-row {
    margin-bottom: 12px;
}

.category-select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #e4e6eb;
    border-radius: 8px;
    background: white;
    font-size: 14px;
    cursor: pointer;
}

.category-select:focus {
    outline: none;
    border-color: #4b9f3e;
}

/* Options Row */
.post-options-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid #e4e6eb;
    border-radius: 8px;
    padding: 8px 12px;
    margin-bottom: 12px;
}

.options-text {
    font-size: 14px;
    color: #65676b;
}

.options-buttons {
    display: flex;
    gap: 8px;
}

.option-btn {
    background: none;
    border: none;
    padding: 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s ease;
    color: #42b883;
    font-size: 20px;
}

.option-btn:hover {
    background: #f0f2f5;
}

/* Emotion Picker */
.emotion-picker {
    background: white;
    border: 1px solid #e4e6eb;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 12px;
    animation: slideDown 0.2s ease;
}

.emotions-list {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.emotion-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    padding: 8px 12px;
    border-radius: 20px;
    cursor: pointer;
    transition: background 0.2s ease;
    font-size: 14px;
}

.emotion-item:hover {
    background: #f0f2f5;
}

.emotion-icon {
    font-size: 16px;
}

.emotion-label {
    color: #1c1e21;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.btn-cancel {
    background: #e4e6eb;
    color: #1c1e21;
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.2s ease;
}

.btn-cancel:hover {
    background: #d8dadf;
}

.btn-publish {
    background: #4b9f3e;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-publish:hover:not(:disabled) {
    background: #4b9f3e;
}

.btn-publish:disabled {
    background: #e4e6eb;
    color: #8a8d91;
    cursor: not-allowed;
}

/* Collapsed Actions */
.create-post-actions {
    display: flex;
    gap: 0;
    border-top: 1px solid #e4e6eb;
    padding-top: 8px;
}

.action-item {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: none;
    border: none;
    padding: 10px;
    cursor: pointer;
    transition: background 0.2s ease;
    color: #4b9e3e;
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
}

.action-item:hover {
    background: #f0f2f5;
}

.action-item i {
    font-size: 16px;
}

/* Animations */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 576px) {
    .create-post {
        padding: 12px;
    }

    .emotions-list {
        justify-content: center;
    }

    .post-options-row {
        flex-direction: column;
        gap: 8px;
        align-items: stretch;
    }

    .options-buttons {
        justify-content: center;
    }
}