/* Blog Editor Layout */
.blog-editor-layout {
    max-width: 1100px;
    margin: 0 auto;
}

.blog-editor-layout form {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 24px;
    align-items: start;
}

.blog-main {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.blog-sidebar {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Form Fields */
.blog-field > label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
}

.blog-field input[type="text"] {
    width: 100%;
    padding: 12px 14px;
    font-size: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.blog-field input[type="text"]:focus {
    outline: none;
    border-color: #4a7c4e;
}

/* Modern Editor */
.modern-editor {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}

.editor-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 12px;
    background: linear-gradient(to bottom, #fafafa, #f0f0f0);
    border-bottom: 1px solid #e0e0e0;
}

.toolbar-group {
    display: flex;
    gap: 2px;
    padding-right: 8px;
    border-right: 1px solid #ddd;
}

.toolbar-group:last-child {
    border-right: none;
}

.editor-toolbar button {
    padding: 6px 10px;
    min-width: 32px;
    height: 32px;
    border: 1px solid #ccc;
    background: #fff;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    color: #444;
    transition: all 0.15s;
}

.editor-toolbar button:hover {
    background: #4a7c4e;
    border-color: #4a7c4e;
    color: #fff;
}

.modern-editor textarea {
    width: 100%;
    min-height: 350px;
    padding: 16px;
    font-size: 15px;
    line-height: 1.7;
    border: none;
    outline: none;
    resize: vertical;
    font-family: Georgia, "Times New Roman", serif;
    box-sizing: border-box;
}

.modern-editor textarea::placeholder {
    color: #aaa;
    font-style: italic;
}

/* SEO Section */
.seo-section {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 16px;
}

.seo-section > label {
    margin-bottom: 12px !important;
}

.seo-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
}

.seo-label {
    display: block;
    font-size: 11px;
    color: #666;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.seo-section input[type="text"] {
    padding: 10px 12px;
    font-size: 13px;
    border: 1px solid #ddd;
    border-radius: 6px;
}

/* Sidebar Cards */
.sidebar-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

.card-title {
    background: #f5f5f5;
    padding: 10px 14px;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #555;
    border-bottom: 1px solid #e0e0e0;
}

.card-content {
    padding: 14px;
}

.card-content input[type="text"],
.card-content select,
.card-content textarea {
    width: 100%;
    padding: 10px;
    font-size: 13px;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-sizing: border-box;
    font-family: inherit;
}

.card-content textarea {
    min-height: 70px;
    resize: vertical;
}

.card-content input:focus,
.card-content select:focus,
.card-content textarea:focus {
    outline: none;
    border-color: #4a7c4e;
}

/* Image Preview */
.img-preview {
    height: 90px;
    background: #f5f5f5;
    border: 2px dashed #ddd;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    color: #999;
    font-size: 13px;
}

.img-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.upload-link {
    display: block;
    margin-top: 8px;
    color: #4a7c4e;
    font-size: 12px;
    text-decoration: none;
}

.upload-link:hover {
    text-decoration: underline;
}

/* Status + Publish */
.status-btns {
    display: flex;
    gap: 16px;
    margin-bottom: 12px;
}

.status-btns label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    cursor: pointer;
}

.publish-btn {
    width: 100%;
    padding: 12px;
    background: #4a7c4e;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.publish-btn:hover {
    background: #3d6640;
}

/* Error */
.blog-error {
    background: #fef2f2;
    color: #dc2626;
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 16px;
    border: 1px solid #fecaca;
}

/* Blog Toolbar on Pages */
.userblog-toolbar {
    background: #4a7c4e;
    border-radius: 8px;
    padding: 14px 18px;
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.userblog-toolbar a {
    display: inline-block;
    padding: 10px 18px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    background: rgba(255,255,255,0.2);
    color: #fff;
    transition: background 0.2s;
}

.userblog-toolbar a:hover {
    background: rgba(255,255,255,0.3);
}

.userblog-toolbar a:first-child {
    background: #fff;
    color: #4a7c4e;
    font-weight: 600;
}

/* UserBlogs Header */
.userblog-header {
    background: #4a7c4e;
    padding: 28px;
    border-radius: 8px;
    margin-bottom: 24px;
    text-align: center;
}

.userblog-header a {
    display: inline-block;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 6px;
    text-decoration: none;
    background: #fff;
    color: #4a7c4e;
}

/* Responsive */
@media (max-width: 800px) {
    .blog-editor-layout form {
        grid-template-columns: 1fr;
    }
    .blog-sidebar {
        order: -1;
    }
    .seo-grid {
        grid-template-columns: 1fr;
    }
}
