/* Courses Module - Premium Styles */
/* AGENTS.md v2.0 compliant */

/* Delete Modal Styles */
.modal-danger .modal-header {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

.modal-danger .modal-body {
    padding: 2rem;
}

.modal-danger .modal-body p {
    margin: 1rem 0;
    color: #374151;
}

.modal-danger .modal-body strong {
    color: #1f2937;
    font-size: 1.1rem;
}

.modal-danger .warning-text {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border-left: 4px solid #ef4444;
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 8px;
    color: #991b1b;
    font-weight: 500;
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.2s;
    cursor: pointer;
}

.btn-danger:hover:not(:disabled) {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

.btn-danger:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Course Actions */
.course-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.course-actions .btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    flex: 0 0 auto;
}

/* Courses Grid */
.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.course-card {
    transition: transform 0.2s, box-shadow 0.2s;
}

.course-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.course-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f0f0f0;
}

.course-name {
    margin: 0;
    color: #1f2937;
    font-size: 1.2rem;
    font-weight: 600;
}

.course-status {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
}

.course-status.active {
    background: #d1fae5;
    color: #065f46;
}

.course-status.inactive {
    background: #e5e7eb;
    color: #6b7280;
}

.course-description {
    color: #6b7280;
    font-size: 0.9rem;
    margin: 0.5rem 0;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.course-meta {
    display: flex;
    gap: 1rem;
    margin: 1rem 0;
    flex-wrap: wrap;
}

.meta-item {
    color: #9ca3af;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* View Toggle */
.view-toggle {
    display: flex;
    gap: 0.5rem;
    margin: 1.5rem 0;
    justify-content: flex-end;
}

.view-btn {
    padding: 0.5rem 1rem;
    border: 2px solid #e5e7eb;
    background: white;
    border-radius: 8px;
    color: #6b7280;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.view-btn:hover {
    border-color: #667eea;
    color: #667eea;
}

.view-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
    color: white;
}

/* Courses Table */
.courses-table {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.table-header {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 1rem;
    padding: 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 600;
}

.table-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid #e5e7eb;
    transition: background 0.2s;
}

.table-row:hover {
    background: #f9fafb;
}

.table-cell {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .courses-grid {
        grid-template-columns: 1fr;
    }

    .module-filters-premium {
        flex-direction: column;
    }

    .filter-group {
        width: 100%;
    }

    .table-header,
    .table-row {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .table-header {
        display: none;
    }

    .table-cell::before {
        content: attr(data-label);
        font-weight: 600;
        margin-right: 0.5rem;
    }

    .course-actions {
        justify-content: center;
    }

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

    .header-actions button {
        width: 100%;
    }
}

@media (max-width: 1024px) {
    .courses-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

/* ============================================
   QUICK WINS - NEW STYLES
   ============================================ */

/* View Toggle Buttons */
.view-controls {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.view-btn {
    padding: 0.5rem 1rem;
    border: 2px solid #e5e7eb;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
    color: #6b7280;
}

.view-btn:hover {
    border-color: #667eea;
    color: #667eea;
    background: #f3f4f6;
}

.view-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* Table Sorting Indicators */
.courses-table .table-header .table-cell {
    user-select: none;
    position: relative;
}

.courses-table .table-header .table-cell:not(:last-child):hover {
    background: #f3f4f6;
    color: #667eea;
}

/* Filter Active State */
.filter-select {
    transition: all 0.2s;
}

.filter-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.search-input {
    transition: all 0.2s;
}

.search-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
}

/* Empty State for Filtered Results */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: #6b7280;
}

.empty-state .empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.empty-state h3 {
    font-size: 1.5rem;
    color: #374151;
    margin-bottom: 0.5rem;
}

.empty-state p {
    font-size: 1rem;
    margin-bottom: 1.5rem;
}

/* Filter Badges (optional enhancement) */
.filter-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 16px;
    font-size: 0.875rem;
    font-weight: 500;
    margin: 0.25rem;
}

.filter-badge .remove {
    cursor: pointer;
    padding: 0.125rem 0.25rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transition: all 0.2s;
}

.filter-badge .remove:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: scale(1.1);
}

