/* Основные стили для LangFlow */

:root {
    --primary-color: rgb(191, 65, 65);
    --secondary-color: rgb(150, 50, 50);
    --light-color: whitesmoke;
    --dark-color: #2c3e50;
    --success-color: #129831;
    --info-color: #17a2b8;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
}

/* Базовые стили */
body {
    font-family: 'Comfortaa', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--dark-color);
    background-color: #f8f9fa;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Плавная прокрутка для якорных ссылок */
html {
    scroll-behavior: smooth;
}

/* Стили для фокуса на элементах */
.btn:focus,
.form-control:focus,
.form-select:focus,
.page-link:focus {
    box-shadow: 0 0 0 0.25rem rgba(191, 65, 65, 0.25) !important;
}

/* Шапка */
.navbar {
    background-color: var(--primary-color) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 0.8rem 0;
}

.navbar-brand {
    font-weight: 600;
    font-family: 'Comfortaa', sans-serif;
}

/* Основной контент */
main.container {
    flex: 1;
    margin-top: 100px !important;
    padding-bottom: 2rem;
}

/* Заголовки */
h1, h2, h3, h4, h5, h6 {
    color: var(--primary-color);
    font-weight: 600;
}

.display-5, .display-4 {
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

/* Карточки */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 1.5rem;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.card-header {
    background-color: rgba(191, 65, 65, 0.08);
    border-bottom: 2px solid rgba(191, 65, 65, 0.15);
    font-weight: 600;
    border-radius: 12px 12px 0 0 !important;
    padding: 1rem 1.5rem;
}

.card-body {
    padding: 1.25rem;
}

.card-title {
    font-size: 1.1rem;
    line-height: 1.4;
    margin-bottom: 0.75rem;
    min-height: 3em;
}

.card-text {
    font-size: 0.9rem;
    line-height: 1.5;
    color: #666;
}

.card .btn-sm {
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
    border-radius: 6px;
}

.card .btn-outline-primary {
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
}

/* Таблицы */
.table {
    margin-bottom: 0;
    border-radius: 8px;
    overflow: hidden;
}

.table thead th {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

.table tbody td {
    padding: 0.75rem;
    vertical-align: middle;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.table tbody tr {
    transition: background-color 0.2s ease;
}

.table tbody tr:hover {
    background-color: rgba(191, 65, 65, 0.04);
}

.table-hover tbody tr:hover {
    background-color: rgba(191, 65, 65, 0.06);
}

/* Кнопки в таблице (иконки) */
.table .btn-group-actions {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.table .btn-icon {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: none;
    transition: all 0.2s ease;
}

.table .btn-icon:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.table .btn-icon i {
    font-size: 0.875rem;
}

.table .btn-icon-view {
    background-color: rgba(23, 162, 184, 0.1);
    color: var(--info-color);
}

.table .btn-icon-edit {
    background-color: rgba(255, 193, 7, 0.1);
    color: var(--warning-color);
}

.table .btn-icon-delete {
    background-color: rgba(220, 53, 69, 0.1);
    color: var(--danger-color);
}

.table .btn-icon-view:hover {
    background-color: rgba(23, 162, 184, 0.2);
}

.table .btn-icon-edit:hover {
    background-color: rgba(255, 193, 7, 0.2);
}

.table .btn-icon-delete:hover {
    background-color: rgba(220, 53, 69, 0.2);
}

/* Для значков в картачках */
.badge {
    padding: 0.5em 1em;
    font-weight: 500;
    border-radius: 20px;
}

.badge.bg-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)) !important;
    color: white;
    font-weight: 500;
    letter-spacing: 0.3px;
}

.badge.bg-secondary {
    background: linear-gradient(135deg, #6c757d, #5a6268) !important;
    color: white;
}

.badge.bg-success {
    background-color: var(--success-color) !important;
}

/* Кнопки */
.btn {
    border-radius: 8px;
    padding: 0.5rem 1.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
    font-family: 'Comfortaa', sans-serif;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: 0 4px 8px rgba(191, 65, 65, 0.2);
}

.btn-primary:hover {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(191, 65, 65, 0.25);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.btn-success {
    background-color: var(--success-color);
    border-color: var(--success-color);
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.2);
}

.btn-danger {
    background-color: var(--danger-color);
    border-color: var(--danger-color);
    box-shadow: 0 4px 8px rgba(220, 53, 69, 0.2);
}

#fixed-course-bar .btn {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

#fixed-course-bar .btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

/* Пагинация */
.pagination {
    margin-top: 1.5rem;
}

.page-link {
    color: var(--primary-color);
    border: 1px solid rgba(191, 65, 65, 0.2);
    margin: 0 4px;
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.page-link:hover {
    color: var(--secondary-color);
    background-color: rgba(191, 65, 65, 0.05);
    border-color: rgba(191, 65, 65, 0.3);
}

.page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* Футер */
footer {
    background-color: var(--primary-color) !important;
    color: white;
    padding: 3rem 0 2rem;
    margin-top: auto;
}

footer h5 {
    color: white;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

footer a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.2s ease;
}

footer a:hover {
    color: white;
}

/* Модальные окна */
.modal-content {
    border-radius: 12px;
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.modal-header {
    background-color: var(--primary-color);
    
    border-radius: 12px 12px 0 0;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.modal-title {
    font-weight: 600;
    color: white;
}

.modal-footer {
    border-top: 1px solid rgba(0,0,0,0.05);
    padding: 1.5rem;
}

/* Формы */
.form-control, .form-select {
    border-radius: 8px;
    border: 1px solid #dee2e6;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(191, 65, 65, 0.25);
}

.form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

/* Уведомления */
#notification-area .alert {
    border-radius: 10px;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    padding: 1rem 1.5rem;
}

/* Анимации */
.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Адаптивность */
@media (max-width: 768px) {
    main.container {
        margin-top: 80px !important;
        padding: 0 1rem;
    }
    
    .display-5 {
        font-size: 2rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .card-title {
        font-size: 1rem;
        min-height: auto;
    }

    .card, .table-responsive {
        border-radius: 10px;
    }
    
    .card .btn-sm {
        padding: 0.2rem 0.5rem;
        font-size: 0.8rem;
    }

    .table thead {
        display: none;
    }
    
    .table tbody tr {
        display: block;
        margin-bottom: 1.5rem;
        border: 1px solid rgba(0,0,0,0.1);
        border-radius: 10px;
        overflow: hidden;
        box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    }
    
    .table tbody td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.75rem 1rem;
        border-bottom: 1px solid rgba(0,0,0,0.05);
    }
    
    .table tbody td:before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--primary-color);
        margin-right: 1rem;
    }
    
    .table tbody td:last-child {
        border-bottom: none;
    }
    
    .table .btn-group-actions {
        justify-content: flex-start;
    }
    
    .badge {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }  

    .page-link {
        padding: 0.3rem 0.6rem;
        font-size: 0.8rem;
    }

    #notification-area {
        top: 70px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    footer {
        padding: 2rem 0 1.5rem;
        text-align: center;
    }
    
    footer .row > div {
        margin-bottom: 1.5rem;
    }

    #fixed-course-bar {
        padding: 8px 0;
    }
    
    #fixed-course-bar .container {
        padding: 0 10px;
    }
    
    #fixed-course-bar h5 {
        font-size: 0.9rem;
        margin-bottom: 2px;
    }
    
    #fixed-course-bar small {
        font-size: 0.7rem;
    }
    
    #fixed-course-bar .btn {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }
}