/* 
 * components.css - Cards, Buttons & Modals
 * Wiederverwendbare UI-Komponenten
 */

/* ===== MATERIAL GRID ===== */
.materials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

/* ===== MATERIAL CARDS ===== */
.bonus-item {
    background: var(--bg-white);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: var(--shadow-soft);
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.bonus-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.bonus-item > * {
    position: relative;
    z-index: 2;
}

.bonus-item:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-strong);
    border-color: var(--primary-color);
}

.bonus-item:hover::before {
    opacity: 0.05;
}

.bonus-item:hover .item-icon {
    transform: scale(1.1);
}

.bonus-item:hover h4,
.bonus-item:hover p {
    color: var(--primary-color);
}

.item-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
    transition: transform 0.3s ease;
}

.bonus-item h4 {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    transition: color 0.3s ease;
}

.bonus-item p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    transition: color 0.3s ease;
}

.item-meta {
    font-size: 0.9rem;
    color: var(--text-secondary);
    background: var(--bg-light);
    padding: 0.5rem 1rem;
    border-radius: 15px;
    display: inline-block;
}

/* ===== BADGES ===== */
.editor-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--gradient-secondary);
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 3;
}

.coming-soon-badge {
    background: #6b7280;
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 3;
}

/* ===== COMING SOON ITEMS ===== */
.coming-soon {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

.coming-soon .item-icon {
    filter: grayscale(1);
}

/* ===== BUTTONS ===== */
.launch-editor-btn {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    background: var(--gradient-editor);
    color: white;
    padding: 1.2rem 2.5rem;
    border: none;
    border-radius: 15px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    margin: 1.5rem 0;
    width: 100%;
    justify-content: center;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.launch-editor-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #5a67d8, #6b46c1);
}

.launch-editor-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* ===== MODALS ===== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.modal-content {
    background: var(--bg-white);
    border-radius: 20px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-strong);
    position: relative;
}

.modal-header {
    padding: 2rem 2rem 1rem;
    border-bottom: 1px solid var(--border-light);
    position: relative;
}

.modal-header h3 {
    font-size: 1.8rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.modal-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 2rem;
}

/* ===== MODAL BADGES ===== */
.modal-editor-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--gradient-secondary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

/* ===== FEATURE BOXES ===== */
.editor-features {
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    border-left: 4px solid #0ea5e9;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.feature-icon {
    font-size: 1.2rem;
}

/* ===== WORKFLOW STEPS ===== */
.workflow-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.workflow-step {
    text-align: center;
    padding: 1rem;
    background: var(--bg-white);
    border-radius: 10px;
    border: 2px solid var(--border-light);
    position: relative;
}

.workflow-step::after {
    content: '→';
    position: absolute;
    right: -1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 1.5rem;
    font-weight: bold;
}

.workflow-step:last-child::after {
    display: none;
}

.step-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    display: block;
}

.step-title {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
}

/* ===== PREVIEW BOXES ===== */
.editor-preview {
    background: var(--bg-light);
    border-radius: 12px;
    padding: 1rem;
    margin: 1rem 0;
    border: 2px dashed #cbd5e1;
}

.preview-text {
    color: var(--text-secondary);
    font-style: italic;
    text-align: center;
    margin: 0.5rem 0;
}

/* ===== TECH SPECS ===== */
.tech-specs {
    background: #fefefe;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
    font-size: 0.9rem;
}

.tech-specs h4 {
    margin: 0 0 0.5rem 0;
    color: var(--text-primary);
    font-size: 1rem;
}

.spec-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.spec-item {
    display: flex;
    justify-content: space-between;
    padding: 0.25rem 0;
    border-bottom: 1px solid #f3f4f6;
}

.spec-label {
    color: var(--text-secondary);
}

.spec-value {
    color: var(--text-primary);
    font-weight: 500;
}

/* ===== CONTENT PREVIEW ===== */
.content-preview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.preview-section {
    background: var(--bg-light);
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.preview-section h4 {
    margin: 0 0 0.5rem 0;
    color: var(--primary-color);
}

.preview-section ul {
    margin: 0;
    padding-left: 1.2rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}









/* ⭐ TRAININGSPROTOKOLL-SYSTEM STYLES */

.protocol-modal-content {
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
}

.protocol-selection {
    text-align: center;
}

.selection-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin: 30px 0;
}

.selection-section h3 {
    margin-bottom: 15px;
    color: var(--text-primary);
}

.template-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-top: 15px;
}

.template-option {
    padding: 15px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    background: white;
}

.template-option:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-soft);
}

.template-option.selected {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, var(--primary-color), #1d4ed8);
    color: white;
}

.template-icon {
    font-size: 24px;
    margin-bottom: 8px;
}

.template-name {
    font-weight: 600;
    font-size: 14px;
}

.age-info-box {
    margin-top: 15px;
    padding: 15px;
    background: var(--bg-light);
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.age-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
    text-align: left;
}

.complexity-stars {
    font-size: 16px;
    margin-bottom: 5px;
}

.age-focus, .age-duration {
    font-size: 14px;
    color: var(--text-secondary);
}

.protocol-actions {
    margin-top: 30px;
}

.protocol-actions .launch-button {
    padding: 12px 24px;
    font-size: 16px;
    min-width: 200px;
}

.protocol-actions .launch-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #9ca3af;
}

/* PROTOKOLL-EDITOR STYLES */

.protocol-editor {
    max-width: 100%;
}

.protocol-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e5e7eb;
    flex-wrap: wrap;
    gap: 10px;
}

.back-button {
    background: #6b7280;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s ease;
}

.back-button:hover {
    background: #4b5563;
}

.protocol-header h2 {
    flex: 1;
    text-align: center;
    margin: 0;
    font-size: 20px;
    color: var(--text-primary);
}

.protocol-meta {
    font-size: 14px;
    color: var(--text-secondary);
    text-align: right;
}

.protocol-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-section {
    background: #f8fafc;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.form-section h3 {
    margin: 0 0 15px 0;
    color: var(--text-primary);
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.form-field {
    display: flex;
    flex-direction: column;
}

.form-field label {
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--text-primary);
    font-size: 14px;
}

.form-field input,
.form-field select,
.form-field textarea {
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-field textarea {
    resize: vertical;
    min-height: 80px;
}

.protocol-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
    flex-wrap: wrap;
}

.save-draft-btn,
.export-pdf-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    min-width: 160px;
}

.save-draft-btn {
    background: var(--secondary-color);
    color: white;
}

.save-draft-btn:hover {
    background: #059669;
    transform: translateY(-1px);
}

.export-pdf-btn {
    background: linear-gradient(135deg, var(--primary-color), #1d4ed8);
    color: white;
}

.export-pdf-btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-soft);
}

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

.auto-save-status {
    text-align: center;
    margin-top: 15px;
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.auto-save-indicator {
    font-size: 12px;
    color: var(--secondary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

/* RESPONSIVE DESIGN */

@media (max-width: 768px) {
    .selection-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .template-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .template-option {
        padding: 12px;
    }
    
    .template-icon {
        font-size: 20px;
    }
    
    .template-name {
        font-size: 12px;
    }
    
    .protocol-header {
        flex-direction: column;
        text-align: center;
    }
    
    .protocol-header h2 {
        text-align: center;
        font-size: 18px;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .protocol-actions {
        flex-direction: column;
    }
    
    .age-details {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .protocol-modal-content {
        margin: 10px;
        max-height: 95vh;
    }
    
    .form-section {
        padding: 15px;
    }
    
    .save-draft-btn,
    .export-pdf-btn {
        padding: 10px 20px;
        font-size: 13px;
        min-width: 140px;
    }
}