/* ========================================
   XP CALCULATOR TAB STYLES
   Calculator-specific components and layouts
   ======================================== */

/* Tasks card specific styling for calculator tab */
.nintendo-card.tasks-card {
    flex: 1 1 100%;
    margin-top: 18px;
    order: 3; /* Ensure tasks card appears last */
}

/* Tasks Card - BEM Methodology */
.tasks-card__header {
    padding: 18px 20px 12px;
    border-bottom: 1px solid var(--nintendo-light-gray);
}

.tasks-card__accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 4px 0;
    width: 100%;
}

.tasks-card__accordion-header:hover {
    color: var(--nintendo-primary);
}

.tasks-card__title-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.tasks-card__title-group h3 {
    margin: 0 0 4px 0;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--nintendo-dark);
}

.tasks-card__subtitle {
    font-size: 0.9rem;
    color: var(--nintendo-gray);
    margin: 0;
    margin-top: 4px;
}

.tasks-card__chevron {
    transition: transform 0.3s ease;
    color: var(--text-muted);
    flex-shrink: 0;
}

.tasks-card__content {
    padding: 20px;
}

.tasks-card__accordion-content {
    background: #f8f9fa;
}

.tasks-card.expanded .task-main-chevron {
    transform: rotate(180deg);
}

.task-accordion-content {
    overflow: hidden;
    transition: all 0.3s ease;
}

/* Tasks table styling - Modern Red & White Design */
.tasks-table {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-top: 20px;
}

.task-level-row {
    background: #ffffff;
    border: 3px solid #e60012;
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 32px rgba(230, 0, 18, 0.15);
    position: relative;
}

.task-level-row::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #e60012 0%, #ff4757 50%, #e60012 100%);
}

.task-level-row:hover {
    border-color: #c70011;
    box-shadow: 0 16px 48px rgba(230, 0, 18, 0.25);
}

.task-level-row.first-level {
    border-color: #e60012;
    box-shadow: 0 12px 40px rgba(230, 0, 18, 0.2);
}

.task-level-row.first-level::before {
    background: linear-gradient(90deg, #007bff 0%, #4dabf7 50%, #007bff 100%);
}

.task-row-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    padding: 20px 24px;
    border-bottom: 2px solid #e60012;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.task-row-header:hover {
    background: linear-gradient(135deg, #ffe6e6 0%, #fff0f0 100%);
}

.task-row-header.first-level {
    cursor: default;
    background: linear-gradient(135deg, #e6f3ff 0%, #f0f8ff 100%);
    border-bottom-color: #e60012;
}

.task-row-header.first-level:hover {
    background: linear-gradient(135deg, #e6f3ff 0%, #f0f8ff 100%);
}

.task-level-info {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
}

.task-level-badge {
    background: linear-gradient(135deg, #e60012 0%, #ff4757 100%);
    color: #ffffff;
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 1.2rem;
    font-weight: 800;
    min-width: 100px;
    text-align: center;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    box-shadow: 0 4px 16px rgba(230, 0, 18, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.2);
    order: 1;
}

.task-level-row.first-level .task-level-badge {
    background: linear-gradient(135deg, #007bff 0%, #4dabf7 100%);
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    box-shadow: 0 4px 16px rgba(0, 123, 255, 0.4);
}

.task-xp-requirement {
    background: #ffffff;
    border: 2px solid #e60012;
    color: #e60012;
    padding: 8px 16px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(230, 0, 18, 0.1);
    order: 2;
    margin-left: auto;
}

.task-level-chevron {
    transition: transform 0.3s ease;
    color: #e60012;
    margin-left: 12px;
    font-size: 1.2rem;
    font-weight: bold;
    order: 3;
    flex-shrink: 0;
}

.task-level-row.expanded .task-level-chevron {
    transform: rotate(180deg);
}

.task-row-content {
    padding: 28px;
    background: #ffffff;
    display: none;
}

.task-level-row.expanded .task-row-content,
.task-level-row.first-level .task-row-content {
    display: block;
}

.task-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    align-items: start;
}

.task-requirements, .task-rewards {
    background: #ffffff;
    border: 2px solid #e60012;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(230, 0, 18, 0.1);
    position: relative;
    overflow: hidden;
}

.task-requirements::before, .task-rewards::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #e60012 0%, #ff4757 100%);
}

.task-section-title {
    font-weight: 800;
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: #e60012;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 2px solid #e60012;
    padding-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.task-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.task-item {
    display: flex;
    align-items: center;
    gap: 14px;
    background: #ffffff;
    border: 2px solid #f8f9fa;
    border-radius: 12px;
    padding: 16px 20px;
    font-size: 1rem;
    line-height: 1.5;
    color: #333333;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 2px solid #eee;
}

.task-item:hover {
    background: #fff5f5;
    border-color: #e60012;
    box-shadow: 0 4px 16px rgba(230, 0, 18, 0.15);
}

.task-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #e60012;
}

.task-text {
    flex: 1;
    transition: all 0.3s ease;
    font-weight: 500;
}

.task-text.completed {
    text-decoration: line-through;
    color: #999999;
    opacity: 0.6;
}

.reward-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.reward-item {
    background: #ffffff;
    border: 2px solid #8fe3a2;
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 0.95rem;
    color: #28a745;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.1);
    transition: all 0.3s ease;
}

.reward-item:hover {
    background: #f8fff9;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.2);
}

.level-completion-rewards {
    margin-top: 24px;
    padding: 24px;
    background: #ffffff;
    border: 2px solid #ffd700;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(255, 215, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.level-completion-rewards::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #ffd700 0%, #ffed4e 100%);
}

.level-completion-title {
    font-weight: 800;
    color: #b8860b;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #ffd700;
    padding-bottom: 8px;
}

.level-completion-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.level-completion-item {
    background: #ffffff;
    border: 2px solid #ffd700;
    padding: 8px 14px;
    border-radius: 10px;
    font-size: 0.9rem;
    color: #b8860b;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.2);
    transition: all 0.3s ease;
}

.level-completion-item:hover {
    background: #fffcf0;
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
}

/* Calculator/Tasks Responsive Styles */
@media (max-width: 768px) {
    .task-row-header, .task-row-content {
        padding: 16px;
    }
    
    .task-requirements, .task-rewards {
        padding: 16px;
    }
    
    .level-completion-list {
        justify-content: flex-start;
    }
    
    .task-item {
        padding: 10px 12px;
    }
    
    .task-checkbox {
        width: 16px;
        height: 16px;
    }

    /* Task Level Info Mobile - Vertical Center Layout */
    .task-level-info {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 12px;
        text-align: center;
    }
    
    /* Task Level Badge Mobile Sizing */
    .task-level-badge {
        padding: 10px 18px;
        font-size: 1.1rem;
        min-width: 120px;
        border-radius: 10px;
        flex-shrink: 0;
        order: 1;
    }
    
    /* Task XP Requirement Mobile Sizing */
    .task-xp-requirement {
        padding: 8px 16px;
        font-size: 0.95rem;
        border-radius: 8px;
        margin-left: 0;
        flex-shrink: 0;
        order: 2;
    }
    
    /* Task Level Chevron Mobile */
    .task-level-chevron {
        font-size: 1rem;
        margin-left: 8px;
        order: 3;
    }

    /* Task Header Large Mobile */
    .task-row-header {
        padding: 14px 18px;
        font-size: 1rem;
    }
}

@media (min-width: 576px) and (max-width: 768px) {
    /* Task Level Info Large Mobile - Vertical Center Layout */
    .task-level-info {
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 10px;
        text-align: center;
    }
    
    .task-level-badge {
        padding: 10px 16px;
        font-size: 1.1rem;
        min-width: 100px;
        border-radius: 10px;
        flex-shrink: 0;
        order: 1;
    }
    
    .task-xp-requirement {
        padding: 6px 12px;
        font-size: 0.95rem;
        border-radius: 8px;
        margin-left: 0;
        flex-shrink: 0;
        order: 2;
    }
    
    .task-level-chevron {
        font-size: 1.1rem;
        margin-left: 10px;
        order: 3;
    }
}

@media (max-width: 576px) {
    /* Task Header Ultra Mobile */
    .task-row-header {
        padding: 12px 16px;
        font-size: 0.95rem;
    }
    
    /* Task Level Info Ultra Mobile - Vertical Center Layout */
    .task-level-info {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 8px;
        text-align: center;
    }
    
    .task-level-badge {
        font-size: 0.95rem;
        padding: 8px 14px;
        min-width: 90px;
        order: 1;
    }
    
    .task-xp-requirement {
        padding: 6px 12px;
        font-size: 0.85rem;
        border-radius: 6px;
        margin-left: 0;
        order: 2;
    }
    
    .task-level-chevron {
        font-size: 0.9rem;
        margin-left: 0;
        order: 3;
    }

    .level-up-message{
        font-size:12px;
    }
}
