/**
 * Стили для плагина Zenith Kanban
 *
 * @package ZenithKanban
 */

/* Контейнер Kanban доски */
.zenith-kanban-container {
    width: 100%;
    overflow-x: auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Индикатор загрузки */
.zenith-kanban-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
    font-size: 16px;
    color: #666;
}

/* Фильтры */
.zenith-kanban-filters {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    align-items: end;
    flex-wrap: wrap;
}

.zenith-kanban-filter {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.zenith-kanban-filter label {
    font-weight: 600;
    font-size: 14px;
    color: #333;
}

.zenith-kanban-filter select {
    min-width: 200px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    font-size: 14px;
}

.zenith-kanban-filter button {
    padding: 8px 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.zenith-kanban-filter button:hover {
    background-color: #f5f5f5;
}

.zenith-kanban-filter button.button-primary {
    background: #0073aa;
    color: #fff;
    border-color: #0073aa;
}

.zenith-kanban-filter button.button-primary:hover {
    background: #005a87;
    border-color: #005a87;
}

/* Kanban доска */
.zenith-kanban-board {
    display: flex;
    gap: 16px;
    padding: 16px;
    min-height: 400px;
}

/* Колонка Kanban доски */
.zenith-kanban-column {
    flex: 0 0 300px;
    background: #f5f5f5;
    border-radius: 8px;
    padding: 12px;
    min-height: 400px;
    display: flex;
    flex-direction: column;
}

/* Заголовок колонки */
.zenith-kanban-column-header {
    font-weight: 600;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.zenith-kanban-column-header h3 {
    margin: 0;
    font-size: 16px;
    color: #333;
}

.zenith-kanban-column-count {
    background: #0073aa;
    color: #fff;
    border-radius: 12px;
    padding: 2px 8px;
    font-size: 12px;
    font-weight: 500;
}

/* Контейнер задач */
.zenith-kanban-tasks {
    flex: 1;
    overflow-y: auto;
}

/* Карточка задачи */
.zenith-kanban-task {
    background: #fff;
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    border-left: 4px solid #ddd;
}

.zenith-kanban-task:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Приоритеты задач */
.zenith-kanban-priority-urgent {
    border-left-color: #e74c3c;
}

.zenith-kanban-priority-high {
    border-left-color: #e67e22;
}

.zenith-kanban-priority-medium {
    border-left-color: #f1c40f;
}

.zenith-kanban-priority-low {
    border-left-color: #3498db;
}

/* Заголовок задачи */
.zenith-kanban-task-title {
    font-weight: 500;
    margin-bottom: 6px;
    font-size: 14px;
    color: #333;
}

/* Описание задачи */
.zenith-kanban-task-description {
    font-size: 13px;
    color: #666;
    margin-bottom: 8px;
    line-height: 1.4;
}

/* Мета-информация задачи */
.zenith-kanban-task-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #888;
    margin-top: 8px;
}

/* Приоритет задачи */
.zenith-kanban-task-priority {
    padding: 2px 6px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    background: #f0f0f0;
    color: #666;
}

/* Дата задачи */
.zenith-kanban-task-date {
    font-size: 11px;
    color: #666;
}

/* Просроченная задача */
.zenith-kanban-task-overdue {
    color: #e74c3c;
    font-weight: 600;
}

/* Аватар исполнителя */
.zenith-kanban-task-assignee {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #fff;
    margin-left: 8px;
}

/* Кнопка добавления задачи */
.zenith-kanban-add-task-container {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed #ddd;
}

.zenith-kanban-add-task-button {
    width: 100%;
    padding: 8px;
    border: 1px dashed #ddd;
    border-radius: 4px;
    background: transparent;
    color: #666;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.zenith-kanban-add-task-button:hover {
    background: #f9f9f9;
    color: #333;
    border-color: #999;
}

/* Перетаскивание */
.zenith-kanban-dragging {
    opacity: 0.5;
    transform: rotate(5deg);
}

.zenith-kanban-drag-over {
    background: #e8f4fd;
    border: 2px dashed #0073aa;
}

/* Модальное окно */
.zenith-kanban-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.zenith-kanban-modal {
    background: #fff;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.zenith-kanban-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 20px 0;
    border-bottom: 1px solid #eee;
}

.zenith-kanban-modal-header h2 {
    margin: 0;
    font-size: 20px;
    color: #333;
}

.zenith-kanban-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.zenith-kanban-modal-close:hover {
    background: #f0f0f0;
    color: #333;
}

.zenith-kanban-modal-body {
    padding: 20px;
}

.zenith-kanban-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 20px;
    border-top: 1px solid #eee;
}

/* Форма в модальном окне */
.zenith-kanban-form-group {
    margin-bottom: 15px;
}

.zenith-kanban-form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #333;
}

.zenith-kanban-form-group input,
.zenith-kanban-form-group textarea,
.zenith-kanban-form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

.zenith-kanban-form-group input:focus,
.zenith-kanban-form-group textarea:focus,
.zenith-kanban-form-group select:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.2);
}

.zenith-kanban-form-row {
    display: flex;
    gap: 15px;
}

.zenith-kanban-form-row .zenith-kanban-form-group {
    flex: 1;
}

.zenith-kanban-ai-breakdown {
    margin-top: 5px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #f9f9f9;
    color: #666;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.zenith-kanban-ai-breakdown:hover {
    background: #f0f0f0;
    color: #333;
}

.zenith-kanban-delete-task {
    background: #e74c3c;
    color: #fff;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.zenith-kanban-delete-task:hover {
    background: #c0392b;
}

/* Комментарии */
.zenith-kanban-comment {
    background: #f9f9f9;
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 10px;
    border-left: 3px solid #0073aa;
}

.zenith-kanban-comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.zenith-kanban-comment-date {
    font-size: 12px;
    color: #666;
}

.zenith-kanban-comment-content {
    font-size: 14px;
    line-height: 1.4;
    color: #333;
}

.zenith-kanban-add-comment {
    margin-top: 10px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #0073aa;
    color: #fff;
    font-size: 13px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.zenith-kanban-add-comment:hover {
    background: #005a87;
}

.zenith-kanban-delete-comment {
    background: none;
    border: none;
    color: #999;
    font-size: 12px;
    cursor: pointer;
    padding: 2px;
    border-radius: 2px;
    transition: background-color 0.2s;
}

.zenith-kanban-delete-comment:hover {
    background: #f0f0f0;
    color: #333;
}

/* Поиск */
.zenith-kanban-search {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    margin-bottom: 15px;
    box-sizing: border-box;
}

.zenith-kanban-search:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.2);
}

/* Индикатор загрузки */
.zenith-kanban-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
}

.zenith-kanban-loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #0073aa;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Ошибки */
.zenith-kanban-error {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 4px;
    border: 1px solid #f5c6cb;
    margin: 15px 0;
}

/* Адаптивность */
@media (max-width: 768px) {
    .zenith-kanban-filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .zenith-kanban-filter {
        width: 100%;
    }
    
    .zenith-kanban-filter select {
        min-width: auto;
        width: 100%;
    }
    
    .zenith-kanban-board {
        flex-direction: column;
        gap: 10px;
    }
    
    .zenith-kanban-column {
        flex: 1;
        width: 100%;
        min-height: 300px;
    }
    
    .zenith-kanban-form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .zenith-kanban-modal {
        width: 95%;
        margin: 10px;
    }
    
    .zenith-kanban-modal-footer {
        flex-direction: column;
        gap: 10px;
    }
    
    .zenith-kanban-modal-footer button {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .zenith-kanban-column {
        padding: 8px;
    }
    
    .zenith-kanban-task {
        padding: 8px;
    }
    
    .zenith-kanban-modal-body {
        padding: 15px;
    }
    
    .zenith-kanban-modal-header,
    .zenith-kanban-modal-footer {
        padding: 15px;
    }
}