/* Händler Schulungsbereich - Komplette Styles */

/* ========================================
   1. ALLGEMEINE STYLES
   ======================================== */

/* Fortschrittsbalken */
.hs-progress-container {
    margin: 20px 0;
}

.hs-progress-bar {
    width: 100%;
    height: 25px;
    background-color: #f0f0f0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

.hs-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50 0%, #45a049 100%);
    transition: width 0.5s ease;
    position: relative;
}

.hs-progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        45deg,
        rgba(255,255,255,.2) 25%,
        transparent 25%,
        transparent 50%,
        rgba(255,255,255,.2) 50%,
        rgba(255,255,255,.2) 75%,
        transparent 75%,
        transparent
    );
    background-size: 30px 30px;
    animation: progress-animation 1s linear infinite;
}

@keyframes progress-animation {
    0% { background-position: 0 0; }
    100% { background-position: 30px 30px; }
}

.hs-progress-text {
    text-align: center;
    margin-top: 10px;
    color: #666;
    font-size: 14px;
}

/* Filter Container */
.hs-course-filter-container {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.hs-course-search {
    flex: 1;
    min-width: 250px;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

.hs-category-filter {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    background: white;
    cursor: pointer;
}

/* Kurs-Grid */
.hs-course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    margin: 30px 0;
}

/* Kurs-Karten */
.hs-course-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hs-course-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.hs-course-thumbnail img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.hs-course-content {
    padding: 20px;
}

.hs-course-content h3 {
    margin: 0 0 15px 0;
    font-size: 20px;
}

.hs-course-content h3 a {
    color: #333;
    text-decoration: none;
}

.hs-course-content h3 a:hover {
    color: #4CAF50;
}

/* Kurs-Meta */
.hs-course-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 14px;
}

.hs-duration {
    color: #666;
}

.hs-difficulty {
    padding: 2px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.hs-difficulty-einsteiger {
    background-color: #e3f2fd;
    color: #1976d2;
}

.hs-difficulty-fortgeschritten {
    background-color: #fff3e0;
    color: #f57c00;
}

.hs-difficulty-experte {
    background-color: #fce4ec;
    color: #c2185b;
}

/* Kurs-Actions */
.hs-course-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

/* Kurs-Button */
.hs-course-button {
    display: inline-block;
    padding: 10px 20px;
    background-color: #4CAF50;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.hs-course-button:hover {
    background-color: #45a049;
    color: white;
}

/* Focus Mode Button */
.hs-focus-mode-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #333;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.hs-focus-mode-button:hover {
    background: #555;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    color: white;
}

.hs-focus-mode-button svg {
    stroke-width: 2;
}

/* Lektions-Liste */
.hs-lesson-list {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.hs-lesson-item {
    padding: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    transition: background-color 0.3s ease;
}

.hs-lesson-item:hover {
    background-color: #f5f5f5;
}

.hs-lesson-item.completed {
    background-color: #e8f5e9;
    border-color: #4CAF50;
}

.hs-lesson-number {
    width: 40px;
    height: 40px;
    background-color: #f0f0f0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-right: 15px;
}

.hs-lesson-item.completed .hs-lesson-number {
    background-color: #4CAF50;
    color: white;
}

.hs-lesson-content {
    flex: 1;
}

.hs-lesson-title {
    font-weight: 500;
    margin-bottom: 5px;
}

.hs-lesson-duration {
    font-size: 14px;
    color: #666;
}

/* Zertifikat */
.hs-certificate {
    border: 3px solid #4CAF50;
    padding: 40px;
    text-align: center;
    margin: 30px 0;
    background: linear-gradient(135deg, #f5f5f5 0%, #ffffff 100%);
    position: relative;
}

.hs-certificate::before {
    content: '🏆';
    font-size: 60px;
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    padding: 0 20px;
}

.hs-certificate h2 {
    color: #4CAF50;
    margin-bottom: 20px;
}

.hs-certificate-code {
    font-family: monospace;
    font-size: 18px;
    background-color: #f0f0f0;
    padding: 10px 20px;
    border-radius: 5px;
    display: inline-block;
    margin-top: 20px;
}

/* Certificate Modal */
.hs-certificate-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
}

.hs-certificate-modal .hs-certificate {
    background: white;
    max-width: 600px;
    width: 100%;
}

.hs-close-modal {
    margin-top: 20px;
    padding: 10px 30px;
    background: #333;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

/* Quiz-Styles */
.hs-quiz-container {
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.hs-quiz-question {
    font-weight: 500;
    margin-bottom: 15px;
}

.hs-quiz-options {
    list-style: none;
    padding: 0;
}

.hs-quiz-option {
    margin-bottom: 10px;
}

.hs-quiz-option label {
    display: block;
    padding: 10px 15px;
    background-color: white;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.hs-quiz-option label:hover {
    border-color: #4CAF50;
    background-color: #f1f8f4;
}

.hs-quiz-option input[type="radio"] {
    margin-right: 10px;
}

.hs-quiz-option.correct label {
    border-color: #4CAF50;
    background-color: #e8f5e9;
}

.hs-quiz-option.incorrect label {
    border-color: #f44336;
    background-color: #ffebee;
}

.hs-quiz-submit {
    margin-top: 20px;
    padding: 12px 30px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.hs-quiz-submit:hover {
    background-color: #45a049;
}

.hs-quiz-submit:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

/* Benachrichtigungen */
.hs-notification {
    position: fixed;
    top: 100px;
    right: 20px;
    padding: 15px 20px;
    margin: 20px 0;
    border-radius: 5px;
    display: flex;
    align-items: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    z-index: 9999;
    min-width: 300px;
}

.hs-notification.success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.hs-notification.error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.hs-notification.info {
    background-color: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

.hs-notification-icon {
    font-size: 24px;
    margin-right: 15px;
}

/* Course Completion */
.hs-course-completion {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    padding: 40px;
    border-radius: 10px;
    text-align: center;
    margin: 30px 0;
}

.hs-course-completion h2 {
    color: white;
    font-size: 32px;
    margin-bottom: 10px;
}

.hs-course-completion p {
    font-size: 18px;
    margin-bottom: 20px;
}

.hs-generate-certificate {
    background: white;
    color: #4CAF50;
    padding: 12px 30px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.hs-generate-certificate:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* ========================================
   2. FOCUS MODE STYLES
   ======================================== */

/* Layout Container */
.hs-focus-mode {
    display: flex;
    min-height: 100vh;
    background-color: #f7f8fa;
}

/* Sidebar Toggle (Mobile) */
.hs-sidebar-toggle {
    display: none;
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1001;
    background: #fff;
    border: none;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    cursor: pointer;
}

.hs-sidebar-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: #333;
    margin: 4px 0;
    transition: all 0.3s ease;
}

.hs-sidebar-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hs-sidebar-toggle.active span:nth-child(2) {
    opacity: 0;
}

.hs-sidebar-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Sidebar */
.hs-focus-sidebar {
    width: 320px;
    background: #fff;
    border-right: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
}

/* Sidebar Header */
.hs-sidebar-header {
    padding: 24px;
    border-bottom: 1px solid #e0e0e0;
    background: #fafafa;
}

.hs-course-info h2 {
    font-size: 18px;
    margin: 0 0 12px 0;
    color: #1a1a1a;
    line-height: 1.3;
}

.hs-course-meta-sidebar {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: #666;
}

.hs-meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.hs-meta-item svg {
    opacity: 0.6;
}

.hs-difficulty-badge {
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.hs-difficulty-badge.einsteiger {
    background: #e3f2fd;
    color: #1976d2;
}

.hs-difficulty-badge.fortgeschritten {
    background: #fff3e0;
    color: #f57c00;
}

.hs-difficulty-badge.experte {
    background: #fce4ec;
    color: #c2185b;
}

/* Overall Progress */
.hs-overall-progress {
    margin-top: 20px;
}

.hs-progress-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 14px;
}

.hs-progress-info span:first-child {
    color: #666;
}

.hs-progress-info span:last-child {
    font-weight: 600;
    color: #4CAF50;
}

.hs-progress-bar-mini {
    height: 6px;
    background: #e0e0e0;
    border-radius: 3px;
    overflow: hidden;
}

.hs-progress-fill-mini {
    height: 100%;
    background: #4CAF50;
    transition: width 0.5s ease;
}

/* Lessons Navigation */
.hs-lessons-navigation {
    flex: 1;
    overflow-y: auto;
    padding: 24px 0;
}

.hs-lessons-navigation h3 {
    font-size: 14px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0 24px;
    margin: 0 0 16px 0;
}

.hs-lesson-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.hs-lesson-nav-item {
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
}

.hs-lesson-nav-item.current {
    background: #f5f5f5;
    border-left-color: #4CAF50;
}

.hs-lesson-nav-item.completed .hs-lesson-nav-link {
    opacity: 0.8;
}

.hs-lesson-nav-link {
    display: flex;
    align-items: center;
    padding: 12px 24px;
    text-decoration: none;
    color: inherit;
    gap: 12px;
    transition: background 0.2s ease;
}

.hs-lesson-nav-link:hover {
    background: #f8f8f8;
}

.hs-lesson-nav-number {
    width: 32px;
    height: 32px;
    background: #f0f0f0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    flex-shrink: 0;
}

.hs-lesson-nav-item.completed .hs-lesson-nav-number {
    background: #4CAF50;
    color: white;
}

.hs-lesson-nav-item.current .hs-lesson-nav-number {
    background: #333;
    color: white;
}

.hs-lesson-nav-content {
    flex: 1;
    min-width: 0;
}

.hs-lesson-nav-content h4 {
    margin: 0 0 4px 0;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hs-lesson-type {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #666;
}

.hs-lesson-type svg {
    width: 14px;
    height: 14px;
}

/* Sidebar Footer */
.hs-sidebar-footer {
    padding: 20px;
    border-top: 1px solid #e0e0e0;
}

.hs-back-to-course {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #666;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s ease;
}

.hs-back-to-course:hover {
    color: #4CAF50;
}

/* Main Content */
.hs-focus-content {
    flex: 1;
    margin-left: 320px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: #fff;
}

/* Top Bar */
.hs-focus-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    border-bottom: 1px solid #e0e0e0;
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 100;
}

.hs-topbar-left h1 {
    margin: 0 0 8px 0;
    font-size: 24px;
    color: #1a1a1a;
}

.hs-lesson-breadcrumb {
    font-size: 14px;
    color: #666;
}

.hs-lesson-breadcrumb a {
    color: #4CAF50;
    text-decoration: none;
}

.hs-lesson-breadcrumb a:hover {
    text-decoration: underline;
}

.hs-lesson-breadcrumb span {
    margin: 0 8px;
}

.hs-mark-complete {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.hs-mark-complete:hover:not(:disabled) {
    background: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.hs-mark-complete.completed {
    background: #e8f5e9;
    color: #4CAF50;
    cursor: default;
}

.hs-mark-complete:disabled {
    opacity: 1;
}

/* Lesson Content */
.hs-lesson-content-wrapper {
    flex: 1;
    padding: 40px;
    max-width: 1000px;
    margin: 0 auto;
    width: 100%;
}

/* Video Wrapper */
.hs-video-wrapper {
    margin-bottom: 40px;
}

.hs-video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.hs-video-container iframe,
.hs-lesson-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

video.hs-lesson-video {
    position: relative;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

/* Text Content */
.hs-lesson-text-content {
    font-size: 16px;
    line-height: 1.8;
    color: #333;
}

.hs-lesson-text-content h2 {
    margin: 32px 0 16px 0;
    font-size: 24px;
    color: #1a1a1a;
}

.hs-lesson-text-content h3 {
    margin: 24px 0 12px 0;
    font-size: 20px;
    color: #1a1a1a;
}

.hs-lesson-text-content p {
    margin-bottom: 16px;
}

.hs-lesson-text-content ul,
.hs-lesson-text-content ol {
    margin-bottom: 16px;
    padding-left: 24px;
}

.hs-lesson-text-content li {
    margin-bottom: 8px;
}

/* Downloads */
.hs-lesson-downloads {
    margin-top: 40px;
    padding: 24px;
    background: #f8f9fa;
    border-radius: 8px;
}

.hs-lesson-downloads h3 {
    margin: 0 0 16px 0;
    font-size: 18px;
}

.hs-download-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.hs-download-list li {
    margin-bottom: 12px;
}

.hs-download-list a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    text-decoration: none;
    color: #333;
    transition: all 0.2s ease;
}

.hs-download-list a:hover {
    border-color: #4CAF50;
    color: #4CAF50;
    transform: translateX(4px);
}

/* Lesson Navigation */
.hs-lesson-navigation {
    display: flex;
    justify-content: space-between;
    padding: 40px;
    border-top: 1px solid #e0e0e0;
    background: #fafafa;
    gap: 20px;
}

.hs-nav-button {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 24px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
    flex: 1;
    max-width: 300px;
}

.hs-nav-button:hover {
    border-color: #4CAF50;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.hs-nav-button div {
    text-align: left;
}

.hs-nav-button.hs-next-lesson {
    margin-left: auto;
    text-align: right;
}

.hs-nav-button.hs-next-lesson div {
    text-align: right;
}

.hs-nav-button span {
    display: block;
    font-size: 12px;
    color: #666;
    margin-bottom: 4px;
}

.hs-nav-button strong {
    display: block;
    font-size: 14px;
    color: #1a1a1a;
}

.hs-nav-placeholder {
    flex: 1;
    max-width: 300px;
}

.hs-complete-course {
    background: #4CAF50;
    color: white;
    border: none;
    cursor: pointer;
}

.hs-complete-course:hover {
    background: #45a049;
}

.hs-complete-course span,
.hs-complete-course strong {
    color: white;
}

/* ========================================
   3. RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 1024px) {
    /* Focus Mode Mobile */
    .hs-focus-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .hs-focus-sidebar.active {
        transform: translateX(0);
    }
    
    .hs-focus-content {
        margin-left: 0;
    }
    
    .hs-sidebar-toggle {
        display: block;
    }
    
    .hs-lesson-content-wrapper {
        padding: 20px;
    }
    
    .hs-focus-topbar {
        padding: 20px;
    }
    
    .hs-lesson-navigation {
        flex-direction: column;
        padding: 20px;
    }
    
    .hs-nav-button {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    /* Kurs-Grid Mobile */
    .hs-course-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .hs-course-meta {
        flex-direction: column;
        gap: 5px;
    }
    
    .hs-lesson-item {
        flex-direction: column;
        text-align: center;
    }
    
    .hs-lesson-number {
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    .hs-course-filter-container {
        flex-direction: column;
    }
    
    .hs-course-search {
        min-width: 100%;
    }
}

@media (max-width: 640px) {
    .hs-focus-topbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .hs-topbar-left h1 {
        font-size: 20px;
    }
    
    .hs-mark-complete {
        width: 100%;
        justify-content: center;
    }
    
    .hs-lesson-breadcrumb {
        font-size: 12px;
    }
    
    .hs-course-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .hs-course-button,
    .hs-focus-mode-button {
        width: 100%;
        justify-content: center;
    }
}

/* Dark Overlay for Mobile */
.hs-sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 999;
}

.hs-sidebar-overlay.active {
    display: block;
}

/* ========================================
   4. UTILITIES
   ======================================== */

/* Smooth Scrolling */
.hs-lesson-nav-list {
    scroll-behavior: smooth;
}

/* Loading State */
.hs-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Print Styles */
@media print {
    .hs-focus-sidebar,
    .hs-sidebar-toggle,
    .hs-focus-topbar,
    .hs-lesson-navigation,
    .hs-course-actions,
    .hs-mark-complete,
    .hs-progress-container {
        display: none;
    }
    
    .hs-focus-content {
        margin-left: 0;
    }
    
    .hs-lesson-content-wrapper {
        padding: 0;
        max-width: 100%;
    }
}