/* New Post Page Styles */

.new-post-container {
    max-width: 900px;
    margin: 130px auto 40px;
    padding: 20px;
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 20px;
    background: #fff;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    font-size: 0.95em;
}

.breadcrumb a {
    color: #667eea;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb .separator {
    color: #a0aec0;
}

.breadcrumb .current {
    color: #4a5568;
}

/* Post Form Card */
.post-form-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.form-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 30px;
    color: #fff;
}

.form-header h1 {
    margin: 0 0 8px 0;
    font-size: 1.8em;
    display: flex;
    align-items: center;
    gap: 12px;
}

.form-header p {
    margin: 0;
    opacity: 0.9;
    font-size: 1.05em;
}

/* Form Styles */
#new-post-form {
    padding: 30px;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 1em;
}

.form-group label i {
    color: #667eea;
}

.required {
    color: #e53e3e;
}

.optional {
    color: #a0aec0;
    font-weight: 400;
    font-size: 0.85em;
}

.form-group input[type="text"],
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1em;
    font-family: inherit;
    transition: all 0.2s;
    box-sizing: border-box;
}

.form-group input[type="text"]:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

.form-group textarea {
    resize: vertical;
    min-height: 200px;
    line-height: 1.6;
}

.char-count {
    text-align: right;
    font-size: 0.85em;
    color: #a0aec0;
    margin-top: 5px;
}

/* Editor Toolbar */
.editor-toolbar {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 10px;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-bottom: none;
    border-radius: 8px 8px 0 0;
}

.toolbar-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    color: #4a5568;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.toolbar-btn:hover {
    background: #667eea;
    color: #fff;
}

.toolbar-separator {
    width: 1px;
    height: 24px;
    background: #e2e8f0;
    margin: 0 5px;
}

.form-group .editor-toolbar+textarea {
    border-radius: 0 0 8px 8px;
}

/* Upload Area */
.upload-area {
    border: 2px dashed #e2e8f0;
    border-radius: 10px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: #f8fafc;
}

.upload-area:hover,
.upload-area.dragover {
    border-color: #667eea;
    background: #f0f4ff;
}

.upload-placeholder i {
    font-size: 3em;
    color: #667eea;
    margin-bottom: 15px;
}

.upload-placeholder p {
    font-size: 1.1em;
    color: #4a5568;
    margin: 0 0 8px 0;
}

.upload-placeholder span {
    font-size: 0.9em;
    color: #a0aec0;
}

/* Media Preview */
.media-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 15px;
}

.media-item {
    position: relative;
    width: 120px;
    height: 120px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.media-item img,
.media-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.media-item .remove-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 24px;
    height: 24px;
    background: rgba(229, 62, 62, 0.9);
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8em;
    transition: transform 0.2s;
}

.media-item .remove-btn:hover {
    transform: scale(1.1);
}

.media-item .video-indicator {
    position: absolute;
    bottom: 5px;
    left: 5px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.75em;
}

/* Tags Preview */
.tags-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.tag-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #667eea;
    color: #fff;
    border-radius: 15px;
    font-size: 0.9em;
}

.tag-badge .remove-tag {
    cursor: pointer;
    opacity: 0.8;
}

.tag-badge .remove-tag:hover {
    opacity: 1;
}

/* Suggested Tags */
.suggested-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
}

.tag-label {
    color: #718096;
    font-size: 0.9em;
}

.suggest-tag {
    padding: 5px 12px;
    background: #f0f4ff;
    color: #667eea;
    border: 1px solid #667eea;
    border-radius: 15px;
    font-size: 0.85em;
    cursor: pointer;
    transition: all 0.2s;
}

.suggest-tag:hover {
    background: #667eea;
    color: #fff;
}

/* Form Actions */
.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid #e2e8f0;
}

.btn-cancel {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 25px;
    background: #fff;
    color: #718096;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    text-decoration: none;
    font-size: 1em;
    transition: all 0.2s;
}

.btn-cancel:hover {
    border-color: #718096;
    color: #4a5568;
}

.btn-submit {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-submit.loading {
    pointer-events: none;
}

.btn-submit.loading i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Status Message */
.status-message {
    margin: 20px 30px 30px;
    padding: 15px 20px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.status-message.success {
    background: #c6f6d5;
    color: #22543d;
    border: 1px solid #9ae6b4;
}

.status-message.error {
    background: #fed7d7;
    color: #742a2a;
    border: 1px solid #feb2b2;
}

.status-message i {
    font-size: 1.2em;
}

/* Responsive */
@media (max-width: 768px) {
    .new-post-container {
        padding: 15px;
        margin-top: 120px;
    }

    .form-header {
        padding: 20px;
    }

    .form-header h1 {
        font-size: 1.4em;
    }

    #new-post-form {
        padding: 20px;
    }

    .upload-area {
        padding: 25px;
    }

    .form-actions {
        flex-direction: column;
    }

    .btn-cancel,
    .btn-submit {
        width: 100%;
        justify-content: center;
    }
}