/**
 * Makale İçerik Yönetimi CSS
 * Admin panel içerik yönetimi ve editör sayfaları için stil tanımları
 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #fff;
    min-height: 100vh;
    color: #1e1e1e;
}

/* ========== İÇERİK YÖNETİMİ LİSTE SAYFA STİLLERİ ========== */

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    overflow: hidden;
}

.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header h1 {
    font-size: 28px;
    font-weight: 600;
}

.header-actions {
    display: flex;
    gap: 15px;
}

.btn {
    padding: 8px 16px;
    border: 1px solid #dcdcdc;
    border-radius: 2px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.1s ease-in-out;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #fff;
    color: #1e1e1e;
}

.btn:hover {
    border-color: #949494;
}

.btn-primary {
    background: #007cba;
    color: white;
    border-color: #007cba;
}

.btn-primary:hover {
    background: #005a87;
    border-color: #005a87;
}

.btn-secondary {
    background: #f0f0f0;
    color: #1e1e1e;
    border-color: #dcdcdc;
}

.btn-secondary:hover {
    background: #e0e0e0;
    border-color: #949494;
}

.btn-danger {
    background: #cc1818;
    color: white;
    border-color: #cc1818;
}

.btn-danger:hover {
    background: #a01313;
    border-color: #a01313;
}

.btn-success {
    background: #00a32a;
    color: white;
    border-color: #00a32a;
}

.btn-success:hover {
    background: #008a20;
    border-color: #008a20;
}

.btn-warning {
    background: #f0b849;
    color: #1e1e1e;
    border-color: #f0b849;
}

.btn-warning:hover {
    background: #dda73a;
    border-color: #dda73a;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn:disabled:hover {
    transform: none;
    box-shadow: none;
}

.tabs {
    display: flex;
    border-bottom: 2px solid #e5e7eb;
    background: #f9fafb;
}

.tab {
    padding: 15px 30px;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
    font-weight: 500;
    color: #6b7280;
}

.tab:hover {
    background: #f3f4f6;
}

.tab.active {
    color: #667eea;
    border-bottom-color: #667eea;
    background: white;
}

.content {
    padding: 30px;
}

.filters {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.search-box {
    flex: 1;
    min-width: 250px;
}

.search-box input {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
}

.search-box input:focus {
    outline: none;
    border-color: #667eea;
}

.filter-select {
    padding: 10px 15px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    cursor: pointer;
}

.filter-select:focus {
    outline: none;
    border-color: #667eea;
}

.table-container {
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

thead {
    background: #f9fafb;
    border-bottom: 2px solid #e5e7eb;
}

th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: #374151;
    font-size: 14px;
}

td {
    padding: 15px;
    border-bottom: 1px solid #e5e7eb;
    font-size: 14px;
    color: #6b7280;
}

tbody tr:hover {
    background: #f9fafb;
}

.status-badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    display: inline-block;
}

.status-badge.yayinda {
    background: #d1fae5;
    color: #065f46;
}

.status-badge.taslak {
    background: #fef3c7;
    color: #92400e;
}

.status-badge.arsiv {
    background: #e5e7eb;
    color: #374151;
}

.action-buttons {
    display: flex;
    gap: 8px;
}

.btn-small {
    padding: 6px 12px;
    font-size: 12px;
}

.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: #6b7280;
}

.empty-state h3 {
    font-size: 20px;
    color: #374151;
    margin-bottom: 10px;
}

.loading {
    text-align: center;
    padding: 60px 20px;
    color: #6b7280;
}

/* ========== EDİTÖR SAYFA STİLLERİ ========== */

body.editor-page {
    background: #fff;
    padding: 0;
    margin: 0;
}

.editor-page .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
    background: transparent;
    box-shadow: none;
}

/* İKİ KOLONLU LAYOUT - Gutenberg Style */
.editor-layout {
    max-width: 1600px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 0;
    align-items: start;
}

/* Sol Kolon - Ana İçerik */
.editor-main {
    background: white;
    padding: 20px 20px;
    min-height: 100vh;
}

/* Sağ Sidebar - Minimal Gutenberg Style */
.editor-sidebar {
    background: #fff;
    border-left: 1px solid #e0e0e0;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    padding: 0;
}

.sidebar-header {
    padding: 16px;
    border-bottom: 1px solid #e0e0e0;
    background: #fff;
}

.sidebar-header h2 {
    font-size: 13px;
    font-weight: 600;
    margin: 0;
    color: #1e1e1e;
}

.sidebar-section {
    padding: 16px;
    border-bottom: 1px solid #e0e0e0;
}

.sidebar-section:last-child {
    border-bottom: none;
}

.sidebar-section h3 {
    font-size: 11px;
    font-weight: 600;
    color: #757575;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.sidebar-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
}

.btn-full {
    width: 100%;
    justify-content: center;
    padding: 10px 16px;
    font-size: 13px;
}

.btn-sm {
    padding: 6px 10px;
    font-size: 12px;
}

.editor-container {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.form-group {
    margin-bottom: 32px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #1e1e1e;
    font-size: 13px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #dcdcdc;
    border-radius: 2px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.1s ease-in-out;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 1px #007cba;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
    line-height: 1.6;
}

.sidebar-section .form-group {
    margin-bottom: 0;
}

.sidebar-section .form-group input,
.sidebar-section .form-group textarea {
    font-size: 13px;
    padding: 6px 10px;
}

.form-group-inline {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.form-hint {
    font-size: 12px;
    color: #6b7280;
    margin-top: 5px;
}

/* Quill Editor Styling - Gutenberg Style */
.quill-container {
    border: 1px solid #dcdcdc;
    border-radius: 2px;
    margin-top: 40px;
}

#editor {
    min-height: 500px;
    background: white;
}

.ql-toolbar {
    border: none !important;
    border-bottom: 1px solid #dcdcdc !important;
    background: #fff;
    padding: 12px !important;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.ql-container {
    border: none !important;
    font-size: 16px;
    font-family: Georgia, serif;
}

.ql-editor {
    min-height: 500px;
    padding: 20px 24px;
    line-height: 1.8;
}

.ql-editor.ql-blank::before {
    color: #949494;
    font-style: normal;
}

.ql-editor p {
    margin-bottom: 1em;
}

.ql-editor h1,
.ql-editor h2,
.ql-editor h3 {
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    font-weight: 600;
    line-height: 1.3;
}

/* Quill Table Better Stilleri */
.ql-editor table {
    border-collapse: collapse;
    margin: 1.5em 0;
    width: 100%;
}

.ql-editor table td,
.ql-editor table th {
    border: 1px solid #ddd;
    padding: 8px 12px;
    vertical-align: top;
}

.ql-editor table th {
    background-color: #f5f5f5;
    font-weight: 600;
}

.ql-editor table tr:hover {
    background-color: #fafafa;
}

/* Tablo hücre seçimi */
.ql-editor .qlbt-cell-selected {
    background-color: #e3f2fd !important;
}

/* Tablo menü butonları */
.ql-snow .ql-picker.ql-table-better {
    width: 120px;
}

.ql-snow .ql-picker.ql-table-better .ql-picker-label::before {
    content: 'Tablo Ekle';
}

/* Image Upload Dropzone */
.image-upload {
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.image-upload:hover {
    border-color: #667eea;
    background: #f9fafb;
}

.image-upload.dragover {
    border-color: #667eea;
    background: #ede9fe;
}

.image-preview {
    margin-top: 15px;
    display: none;
}

.image-preview img {
    max-width: 100%;
    max-height: 300px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.image-preview-actions {
    margin-top: 10px;
    display: flex;
    gap: 10px;
    justify-content: center;
}

/* Multi-Select Kategoriler */
.kategori-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.kategori-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #ede9fe;
    color: #5b21b6;
    border-radius: 16px;
    font-size: 13px;
}

.kategori-item input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.kategori-select {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.kategori-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    cursor: pointer;
    transition: all 0.1s;
}

.kategori-checkbox:hover {
    opacity: 0.8;
}

.kategori-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
    cursor: pointer;
    accent-color: #007cba;
}

.kategori-checkbox label {
    margin: 0;
    cursor: pointer;
    font-weight: 400;
    font-size: 13px;
    flex: 1;
    color: #1e1e1e;
}

.kategori-checkbox input[type="checkbox"]:checked + label {
    font-weight: 500;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.modal-header {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #1f2937;
}

.modal-footer {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 25px;
}

/* Alert Messages */
.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-info {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

/* ========== RESPONSIVE ========== */

@media (max-width: 1024px) {
    .editor-layout {
        grid-template-columns: 1fr;
    }

    .editor-sidebar {
        position: static;
        height: auto;
        border-left: none;
        border-top: 1px solid #e0e0e0;
    }

    .editor-main {
        padding: 20px 20px;
    }
}

@media (max-width: 768px) {
    body.editor-page {
        padding: 0;
    }

    .editor-main {
        padding: 10px 10px;
    }

    .sidebar-section {
        padding: 12px 16px;
    }

    .header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }

    .header-actions {
        width: 100%;
        flex-direction: column;
    }

    .header-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .filters {
        flex-direction: column;
    }

    .search-box {
        min-width: 100%;
    }

    .form-group-inline {
        grid-template-columns: 1fr;
    }

    .table-container {
        font-size: 12px;
    }

    th, td {
        padding: 10px;
    }

    .action-buttons {
        flex-direction: column;
    }

    .tabs {
        overflow-x: auto;
    }

    .tab {
        white-space: nowrap;
        padding: 15px 20px;
    }
}

/* Input with Button Layout */
.input-with-button {
    display: flex;
    gap: 10px;
    align-items: center;
}

.input-with-button input {
    flex: 1;
}

.input-with-button .btn {
    flex-shrink: 0;
    white-space: nowrap;
}

/* Image Preview */
.image-preview {
    margin-top: 15px;
    padding: 10px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    background: #f9fafb;
}

.image-preview img {
    max-width: 100%;
    max-height: 300px;
    border-radius: 4px;
    display: block;
}

/* Helper Text & Slug Preview */
.help-text {
    font-size: 12px;
    color: #6b7280;
    margin-top: 5px;
}

.slug-preview {
    font-size: 12px;
    color: #6b7280;
    margin-top: 5px;
    font-family: monospace;
    background: #f9fafb;
    padding: 6px 10px;
    border-radius: 4px;
}

.char-count {
    font-size: 12px;
    color: #6b7280;
    margin-top: 5px;
    text-align: right;
}

.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.loading-overlay.active {
    display: flex;
}

.loading-spinner {
    background: white;
    padding: 30px 40px;
    border-radius: 12px;
    text-align: center;
}

.spinner {
    border: 4px solid #f3f4f6;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

