#public-courses-widget { font-size: 0; color: transparent; height: 0; }

/* Filters Section */
.filters-section {
    background: white; padding: 24px; margin-bottom: 24px; border: 1px solid #e2e8f0;
    display: flex; flex-wrap: nowrap; gap: 16px; align-items: center;
}
.search-input-wrapper { position: relative; flex: 1 1 320px; min-width: 160px; }
.search-icon { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: #64748b; pointer-events: none; width: 18px; height: 18px; }
.search-input { width: 100%; padding: 8px 12px 8px 40px; border: 2px solid #e2e8f0; font-size: 14px; transition: all 0.2s ease; background: white; }
.search-input:focus { outline: none; }
.clear-button { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: none; border: none; padding: 4px; cursor: pointer; color: #64748b; transition: all 0.2s ease; }
.clear-button:hover { background: #f1f5f9; color: #334155; }

.language-filters { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.filter-label { font-weight: 500; color: #475569; margin-right: 6px; }
.language-btn { padding: 8px 12px; border: 2px solid #e2e8f0; background: white; font-weight: 500; cursor: pointer; transition: all 0.2s ease; min-width: 46px; }
.language-btn:hover { border-color: var(--bs-link-color); background: #f8fafc; }
.language-btn.active { background: var(--bs-link-color); border-color: var(--bs-link-color); color: white; }

.checkbox-container { display: flex; align-items: center; cursor: pointer; font-weight: 500; color: #475569; }
.checkbox-container.guaranteed-filter { flex: 0 0 auto; }
.checkbox-container input[type="checkbox"] { display: none; }
.checkmark { width: 20px; height: 20px; border: 2px solid #e2e8f0; margin-right: 8px; display: flex; align-items: center; justify-content: center; transition: all 0.2s ease; }
.checkbox-container input[type="checkbox"]:checked + .checkmark { background: var(--bs-link-color); border-color: var(--bs-link-color); }
.checkbox-container input[type="checkbox"]:checked + .checkmark::after { content: '✓'; color: white; font-size: 14px; font-weight: bold; }

/* Courses Section */
.courses-section { min-height: 400px; }
.loading { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 60px 20px; color: #64748b; }
.spinner { width: 32px; height: 32px; border: 3px solid #e2e8f0; border-top: 3px solid var(--bs-link-color); border-radius: 50%; margin-bottom: 12px; }
.error-message { text-align: center; padding: 60px 20px; color: #dc2626; }
.retry-btn { margin-top: 16px; padding: 8px 16px; background: #dc2626; color: white; border: none; cursor: pointer; font-weight: 500; transition: background 0.2s ease; }
.no-results { text-align: center; padding: 60px 20px; color: #64748b; font-size: 18px; }
.courses-container { display: flex; flex-direction: column; gap: 24px; }

/* Course Cards */
.course-card { background: white; border: 1px solid #e2e8f0; padding: 16px 24px; margin: 4px 0; transition: all 0.2s ease; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.course-card:hover { border-color: #cbd5e1; }
.course-info { display: flex; flex-grow: 1; align-items: center; gap: 20px; }
.course-title { font-size: 1rem; font-weight: 600; color: #1e293b; flex: 1 1 auto; min-width: 0; max-width: 636px; overflow-wrap: anywhere; word-break: break-word; }
.course-details-inline { display: flex; align-items: center; gap: 15px; color: #64748b; font-size: 0.9rem; flex: 0 0 auto; white-space: nowrap; }
.course-detail-item { display: flex; align-items: center; gap: 4px; }
.course-detail-item strong { color: #334155; font-weight: 500; }
.course-price-section { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.original-price { font-size: 0.9rem; color: #64748b; text-decoration: line-through; }
.current-price { font-size: 1.1rem; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.guaranteed-badge { width: 20px; height: 20px; background: var(--bg-green-dark); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: white; font-size: 15px; font-weight: bold; flex-shrink: 0; }
.register-btn { border: none; cursor: pointer; transition: all 0.2s ease; text-decoration: none; display: inline-block; flex-shrink: 0; }
.highlighted-price { background-color: #facc15; padding: 4px 8px; color: #1e293b; font-weight: 700; display: inline-block; margin-left: 8px; }

/* Focus styles for accessibility */
.search-input:focus, .language-btn:focus, .checkbox-container:focus-within { outline: 2px solid #3b82f6; outline-offset: 2px; }

/* Responsive */
@media (max-width: 768px) {
    .filters-section { padding: 20px; flex-wrap: wrap; gap: 12px; }
    .search-input-wrapper { flex: 1 1 100%; min-width: 0; }
    .language-filters, .checkbox-container.guaranteed-filter { flex: 1 1 auto; }
    .course-card { flex-direction: column; align-items: flex-start; gap: 16px; }
    .course-info { width: 100%; flex-direction: column; align-items: flex-start; gap: 12px; }
    .course-details-inline { flex-wrap: wrap; white-space: normal; gap: 8px; }
    .course-price-section { width: 100%; flex-wrap: wrap; gap: 8px; justify-content: flex-start; }
    .register-btn { width: 100%; text-align: center; }
}
@media (max-width: 480px) {
    .filters-section { padding: 16px; }
    .language-filters { flex-wrap: wrap; }
    .course-card { padding: 16px; }
    .course-title { font-size: 0.95rem; }
    .course-details-inline { font-size: 0.85rem; }
    .current-price { font-size: 1rem; }
    .highlighted-price { padding: 3px 6px; font-size: 0.95rem; margin-left: 4px; }
}
