/* Task Detail Page Styles (independent from categories) */

/* Breadcrumb styles */
.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    list-style: none;
    margin-bottom: 1.5rem;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
    color: var(--text-secondary);
}

.breadcrumb-item+.breadcrumb-item::before {
    content: "»";
    color: var(--text-muted);
    margin: 0 0.5rem;
    font-weight: normal;
}

.breadcrumb-item.active {
    color: var(--text-primary);
    font-weight: 500;
}

.breadcrumb-item.active+.breadcrumb-item::before {
    display: none;
}

.breadcrumb-item a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumb-item a:hover {
    color: var(--primary-color);

}

/* Title */
.task-detail-page .task-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
    margin-bottom: 1rem;
}

/* Meta row */
.task-detail-page .task-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* Difficulty badge (copied style semantics from categories) */
.task-detail-page .task-difficulty-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0.5px;
}

.task-detail-page .task-difficulty-badge.difficulty-łatwy,
.task-detail-page .task-difficulty-badge.difficulty-Łatwy {
    background: #e8f5e8;
    color: #2e7d32;
}

.task-detail-page .task-difficulty-badge.difficulty-łatwy i,
.task-detail-page .task-difficulty-badge.difficulty-Łatwy i {
    color: #2e7d32;
}

.task-detail-page .task-difficulty-badge.difficulty-średni,
.task-detail-page .task-difficulty-badge.difficulty-Średni {
    background: #fff3e0;
    color: #f57c00;
}

.task-detail-page .task-difficulty-badge.difficulty-średni i,
.task-detail-page .task-difficulty-badge.difficulty-Średni i {
    color: #f57c00;
}

.task-detail-page .task-difficulty-badge.difficulty-trudny {
    background: #ffebee;
    color: #c62828;
}

.task-detail-page .task-difficulty-badge.difficulty-trudny i {
    color: #c62828;
}

/* Premium badge */
.premium-badge-small {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: linear-gradient(135deg, #f39c12, #e74c3c);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.premium-badge-small i {
    font-size: 0.8rem;
    color: #ffd700;
}

.task-meta .task-like-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
    padding: 0.5rem;
    font-size: 1.2rem;
}

/* Ensure heart icon follows button color, not generic .task-meta i */
.task-detail-page .task-meta .task-like-btn i {
    color: currentColor !important;
}

.task-meta .task-like-btn:hover {
    color: #e91e63;
    transform: scale(1.2);
}

.task-meta .task-like-btn.liked {
    color: #e91e63;
    animation: heartBeat 0.6s ease-in-out;
}

.task-meta .task-like-btn.liked:hover {
    color: #c2185b;
    transform: scale(1.2);
}

@keyframes heartBeat {
    0% {
        transform: scale(1);
    }

    14% {
        transform: scale(1.3);
    }

    28% {
        transform: scale(1);
    }

    42% {
        transform: scale(1.3);
    }

    70% {
        transform: scale(1);
    }
}

.task-content {
    margin: 1.5rem 0;
    background: var(--background-color);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

/* Content card - more prominent */

.task-detail-page .task-content .card-body {
    padding: 1.5rem;
}

/* Task text font to match category task descriptions */
.task-detail-page .task-text {
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    font-size: 1.05rem;
    font-weight: 400;
    letter-spacing: 0.01em;
}

.task-text ul {
    margin-left: 1.5rem;
}

/* Video full width with rounded corners */
.task-detail-page .task-video {
    border-radius: 0.375rem;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.task-detail-page .video-wrapper {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    border-radius: 0.375rem;
    overflow: hidden;
}

.task-detail-page .video-wrapper iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* MathJax tweaks moved from inline style */
mjx-container {
    display: inline-block;
    margin: 0 0.1em;
}

.task-detail-page .math-display {
    text-align: center;
    margin: 1rem 0;
    padding: 1rem;
    background: var(--background-color);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

[data-theme="dark"] .task-detail-page .math-display {
    background: var(--surface-color);
    border-color: var(--border-color);
}

@media (max-width: 768px) {
    .task-detail-page .task-title {
        font-size: 1.5rem;
    }

    .task-detail-page .task-content .card-body {
        padding: 1rem;
    }
}

/* Dark mode support */
[data-theme="dark"] .breadcrumb {
    background: var(--surface-color);
    border-color: var(--border-color);
}

[data-theme="dark"] .premium-badge-small {
    background: linear-gradient(135deg, #f39c12, #e74c3c);
}

[data-theme="dark"] .task-meta .task-like-btn {
    color: var(--text-muted);
}

[data-theme="dark"] .task-meta .task-like-btn:hover {
    color: #e91e63;
}

[data-theme="dark"] .task-meta .task-like-btn.liked {
    color: #e91e63;
}

[data-theme="dark"] .task-meta .task-like-btn.liked:hover {
    color: #c2185b;
}

[data-theme="dark"] .task-difficulty-badge.difficulty-Łatwy {
    background: rgba(46, 125, 50, 0.2);
    color: #4caf50;
}

[data-theme="dark"] .task-difficulty-badge.difficulty-Łatwy i {
    color: #4caf50;
}

[data-theme="dark"] .task-difficulty-badge.difficulty-Średni {
    background: rgba(245, 124, 0, 0.2);
    color: #ff9800;
}

[data-theme="dark"] .task-difficulty-badge.difficulty-Średni i {
    color: #ff9800;
}

[data-theme="dark"] .task-difficulty-badge.difficulty-trudny {
    background: rgba(198, 40, 40, 0.2);
    color: #f44336;
}

[data-theme="dark"] .task-difficulty-badge.difficulty-trudny i {
    color: #f44336;
}