/**
 * Tayf Learning Hub - Frontend Styles
 */

/* Module Card Styles */
.tayf-module-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
    position: relative;
}

.tayf-module-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

.tayf-module-card.module-locked {
    opacity: 0.6;
    cursor: not-allowed;
}

.module-locked-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: #64748b;
    color: #ffffff;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
}

.module-header {
    margin-bottom: 1.5rem;
}

.module-top {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.module-icon {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    flex-shrink: 0;
}

.module-info {
    flex: 1;
}

.module-title-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.module-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    color: #1e293b;
}

.module-description {
    color: #64748b;
    margin: 0;
    line-height: 1.6;
}

.module-stats {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
    padding: 1rem 0;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
}

.module-stat {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #64748b;
    font-size: 0.875rem;
}

.module-topics {
    margin-bottom: 1rem;
}

.module-topics h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: #64748b;
    margin: 0 0 0.5rem 0;
}

.topics-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.topic-badge {
    background: #f1f5f9;
    color: #475569;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.module-progress {
    margin-bottom: 1.5rem;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    color: #64748b;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 9999px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(to right, #3b82f6, #2563eb);
    border-radius: 9999px;
    transition: width 1s ease;
}

.module-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: #1e293b;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

.module-button:hover {
    background: #0f172a;
    transform: translateY(-2px);
}

.module-button[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
}

.button-arrow {
    font-size: 1.25rem;
}

/* Exercise Form Styles */
.tayf-exercise-form {
    background: #ffffff;
    border-radius: 16px;
    padding: 2rem;
}

.exercise-header {
    margin-bottom: 2rem;
}

.exercise-icon-title {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.exercise-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #10b981, #059669);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    flex-shrink: 0;
}

.exercise-title {
    font-size: 1.875rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    color: #1e293b;
}

.exercise-description {
    color: #64748b;
    margin: 0;
    line-height: 1.6;
}

.exercise-info-badges {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.exercise-instructions {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
}

.instructions-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.exercise-instructions h3 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
    color: #1e40af;
}

.exercise-instructions p {
    margin: 0;
    color: #1e40af;
    line-height: 1.6;
}

/* Tabs */
.tabs {
    margin-top: 2rem;
}

.tabs-list {
    display: flex;
    gap: 0.5rem;
    border-bottom: 2px solid #e2e8f0;
    margin-bottom: 1.5rem;
}

.tab-trigger {
    padding: 0.75rem 1.5rem;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: #64748b;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: -2px;
}

.tab-trigger:hover {
    color: #1e293b;
}

.tab-trigger.active {
    color: #1e293b;
    border-bottom-color: #1e293b;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Card */
.card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
}

.card-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    color: #1e293b;
}

.card-description {
    color: #64748b;
    margin: 0;
    line-height: 1.6;
}

.card-content {
    padding: 1.5rem;
}

/* Form Elements */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #1e293b;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-help {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: #64748b;
}

.file-upload-area {
    border: 2px dashed #e2e8f0;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    transition: all 0.2s ease;
    cursor: pointer;
}

.file-upload-area:hover {
    border-color: #3b82f6;
    background: #f8fafc;
}

.file-upload-area input[type="file"] {
    display: none;
}

.file-upload-area p {
    margin: 0.5rem 0 0 0;
    color: #64748b;
    font-size: 0.875rem;
}

/* Quiz */
.quiz-questions {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.quiz-question h4 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 1rem 0;
    color: #1e293b;
}

.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.quiz-options label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quiz-options label:hover {
    background: #f8fafc;
    border-color: #3b82f6;
}

.quiz-options input[type="radio"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

/* Self Assessment */
.self-assessment-items {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.assessment-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.assessment-item:hover {
    background: #f8fafc;
}

.assessment-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

/* Submission Summary */
.submission-summary {
    padding: 1.5rem;
    background: #f8fafc;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.submission-summary h4 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 1rem 0;
    color: #1e293b;
}

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

.summary-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.summary-item strong {
    color: #64748b;
    font-size: 0.875rem;
}

.summary-value {
    color: #1e293b;
    font-weight: 600;
}

.submission-info {
    padding: 1.5rem;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.submission-info h4 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 1rem 0;
    color: #065f46;
}

.submission-info ul {
    margin: 0;
    padding-left: 0;
    list-style: none;
}

.submission-info li {
    color: #065f46;
    margin-bottom: 0.5rem;
}

.submission-buttons {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-primary {
    background: #dbeafe;
    color: #1e40af;
}

.badge-success {
    background: #d1fae5;
    color: #065f46;
}

.difficulty-badge {
    background: #fef3c7;
    color: #92400e;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary {
    background: #1e293b;
    color: #ffffff;
}

.btn-primary:hover {
    background: #0f172a;
}

.btn-secondary {
    background: #f1f5f9;
    color: #475569;
}

.btn-secondary:hover {
    background: #e2e8f0;
}

/* Responsive */
@media (max-width: 768px) {
    .module-top {
        flex-direction: column;
    }
    
    .module-stats {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .tabs-list {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .tab-trigger {
        white-space: nowrap;
    }
    
    .summary-grid {
        grid-template-columns: 1fr;
    }
    
    .submission-buttons {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
}

