/* TRADING JOURNEY WIDGET CSS - chart.tech */
/* Version 2.1 - Mit Priority Tags und Click-Fixes */

#trading-journey-widget {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    max-width: 900px;
    margin: 20px auto;
    background: #FFFFFF;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    border: 1px solid #F0F0F0;
}

#trading-journey-widget * {
    box-sizing: border-box;
}

/* Header */
.tj-header {
    text-align: center;
    padding: 25px 15px 15px;
    background: linear-gradient(135deg, #FAFAFA 0%, #FFFFFF 100%);
    border-bottom: 2px solid #F0F0F0;
}

.tj-title {
    font-size: 26px;
    font-weight: 800;
    margin: 0 0 8px 0;
    background: linear-gradient(135deg, #E8FF00 0%, #D0E800 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.tj-subtitle {
    color: #666;
    font-size: 14px;
    margin: 0 0 15px 0;
    font-weight: 500;
    padding: 0 10px;
}

.tj-phase-indicator {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #F0FFE0;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: #5A7A00;
    margin-top: 10px;
}

.phase-dot {
    width: 8px;
    height: 8px;
    background: #D0E800;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Progress Container */
.tj-progress-container {
    padding: 15px;
    background: #FAFAFA;
    border-bottom: 1px solid #F0F0F0;
}

.tj-progress-overview {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 15px;
}

.tj-stat-card {
    background: #FFFFFF;
    padding: 10px;
    border-radius: 10px;
    border: 1px solid #E5E5E5;
    text-align: center;
}

.tj-stat-value {
    font-size: 20px;
    font-weight: 700;
    color: #0A0A0A;
    margin: 0;
}

.tj-stat-label {
    font-size: 10px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 2px;
}

.tj-progress-bar-wrapper {
    background: #E5E5E5;
    height: 6px;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.tj-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #E8FF00, #D0E800);
    border-radius: 10px;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(232, 255, 0, 0.3);
}

/* Phase Navigation */
.tj-phases-nav {
    display: flex;
    overflow-x: auto;
    background: #FAFAFA;
    padding: 12px 8px;
    gap: 6px;
    border-bottom: 1px solid #F0F0F0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.tj-phases-nav::-webkit-scrollbar {
    display: none;
}

.tj-phase-btn {
    flex-shrink: 0;
    padding: 10px 12px;
    background: #FFFFFF;
    border: 1px solid #E5E5E5;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 11px;
    color: #666;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    font-weight: 500;
    position: relative;
    touch-action: manipulation;
}

.tj-phase-btn:active {
    transform: scale(0.98);
}

.tj-phase-btn.active {
    background: #E8FF00;
    color: #000;
    border-color: #D0E800;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(232, 255, 0, 0.3);
}

.tj-phase-btn.completed {
    background: #F0FFE0;
    border-color: #D0E800;
    color: #5A7A00;
}

.tj-phase-icon {
    font-size: 16px;
}

.tj-phase-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.tj-phase-name {
    font-weight: 600;
    margin-bottom: 2px;
    font-size: 11px;
}

.tj-phase-days {
    font-size: 9px;
    opacity: 0.7;
}

.tj-phase-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: #E5E5E5;
    border-radius: 0 0 9px 9px;
    overflow: hidden;
}

.tj-phase-progress-fill {
    height: 100%;
    background: #D0E800;
    transition: width 0.3s ease;
}

/* Content Area */
.tj-content {
    padding: 20px 15px;
    min-height: 400px;
    background: #FFFFFF;
}

.tj-phase-content {
    display: none;
    animation: tjFadeIn 0.3s ease;
}

.tj-phase-content.active {
    display: block;
}

@keyframes tjFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.tj-phase-header {
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #F0F0F0;
}

.tj-phase-title {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 8px 0;
    color: #0A0A0A;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tj-phase-desc {
    color: #666;
    font-size: 13px;
    line-height: 1.5;
    margin: 0;
}

/* Checkpoints */
.tj-checkpoint {
    background: #FAFAFA;
    border: 1px solid #F0F0F0;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
    transition: all 0.2s ease;
}

.tj-checkpoint.completed {
    background: #F0FFE0;
    border-color: #D0E800;
}

.tj-checkpoint-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    cursor: pointer;
}

.tj-checkpoint-title {
    font-size: 14px;
    font-weight: 600;
    color: #0A0A0A;
    flex: 1;
    margin-right: 10px;
}

.tj-checkpoint-count {
    background: #E5E5E5;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
    color: #666;
    white-space: nowrap;
}

.tj-checkpoint.completed .tj-checkpoint-count {
    background: #D0E800;
    color: #000;
}

/* Task List */
.tj-checklist {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tj-task {
    display: flex;
    align-items: center;
    padding: 10px 8px;
    border-bottom: 1px solid #F0F0F0;
    cursor: pointer;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    position: relative;
    gap: 12px;
}

.tj-task:last-child {
    border-bottom: none;
}

.tj-task:active {
    background: rgba(232, 255, 0, 0.1);
    border-radius: 6px;
}

/* Checkbox Wrapper - Fixed for better clicking */
.tj-checkbox-wrapper {
    flex-shrink: 0;
    pointer-events: none; /* Wichtig für ganze Zeile klickbar */
}

.tj-checkbox {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    pointer-events: all; /* Checkbox selbst bleibt klickbar */
}

.tj-checkbox-custom {
    width: 18px;
    height: 18px;
    border: 2px solid #D0D0D0;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    background: #FFFFFF;
}

.tj-checkbox:checked ~ .tj-checkbox-custom {
    background: #E8FF00;
    border-color: #D0E800;
}

.tj-checkbox-custom::after {
    content: '✓';
    color: #000;
    font-weight: bold;
    font-size: 11px;
    opacity: 0;
    transform: scale(0);
    transition: all 0.2s ease;
}

.tj-checkbox:checked ~ .tj-checkbox-custom::after {
    opacity: 1;
    transform: scale(1);
}

.tj-task-label {
    font-size: 13px;
    line-height: 1.4;
    color: #333;
    flex-grow: 1;
    padding-right: 10px;
}

.tj-checkbox:checked ~ .tj-task-label {
    color: #5A7A00;
    text-decoration: line-through;
    opacity: 0.8;
}

/* Priority Tags - NEU */
.tj-priority-tag {
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    flex-shrink: 0;
}

.tj-priority-soft {
    background: rgba(34, 197, 94, 0.1);
    color: #22C55E;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.tj-priority-mid {
    background: rgba(251, 191, 36, 0.1);
    color: #F59E0B;
    border: 1px solid rgba(251, 191, 36, 0.2);
}

.tj-priority-hard {
    background: rgba(239, 68, 68, 0.1);
    color: #EF4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Info Box */
.tj-info-box {
    background: linear-gradient(135deg, #FFFEF0 0%, #F0FFE0 100%);
    border: 1px solid #E8FF00;
    border-radius: 12px;
    padding: 14px;
    margin: 15px 0;
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.tj-info-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    background: #E8FF00;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.tj-info-text {
    font-size: 12px;
    line-height: 1.5;
    color: #555;
}

/* Actions */
.tj-actions {
    display: flex;
    gap: 10px;
    justify-content: space-between;
    padding: 15px;
    background: #FAFAFA;
    border-top: 1px solid #F0F0F0;
}

.tj-btn {
    flex: 1;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid #E5E5E5;
    background: #FFFFFF;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    touch-action: manipulation;
}

.tj-btn:active {
    transform: scale(0.98);
}

.tj-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.tj-btn-next {
    background: #E8FF00;
    color: #000;
    border-color: #D0E800;
}

/* Save Section */
.tj-save-section {
    padding: 15px;
    background: #FAFAFA;
    border-top: 1px solid #F0F0F0;
}

.tj-save-row {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

.tj-save-btn,
.tj-results-btn {
    flex: 1;
    padding: 12px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: none;
    touch-action: manipulation;
}

.tj-save-btn {
    background: linear-gradient(135deg, #E8FF00, #D0E800);
    color: #000;
}

.tj-results-btn {
    background: #FFFFFF;
    color: #333;
    border: 2px solid #E8FF00;
}

.tj-save-btn:active,
.tj-results-btn:active {
    transform: scale(0.98);
}

.tj-link-display {
    display: none;
    background: #FFFFFF;
    border: 1px solid #E8FF00;
    padding: 12px;
    border-radius: 10px;
    margin-top: 12px;
}

.tj-link-display.active {
    display: block;
    animation: tjSlideIn 0.3s ease;
}

@keyframes tjSlideIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.tj-link-url {
    background: #F5F5F5;
    padding: 10px;
    border-radius: 8px;
    font-family: monospace;
    font-size: 11px;
    color: #333;
    word-break: break-all;
    margin: 10px 0;
    border: 1px solid #E5E5E5;
}

.tj-copy-btn {
    width: 100%;
    padding: 10px;
    background: #E8FF00;
    color: #000;
    border: 1px solid #D0E800;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

/* Results Modal */
.tj-results-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    padding: 20px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.tj-results-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.tj-results-content {
    background: #FFFFFF;
    border-radius: 16px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlide 0.3s ease;
}

@keyframes modalSlide {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.tj-results-header {
    padding: 25px 20px 15px;
    background: linear-gradient(135deg, #E8FF00, #D0E800);
    color: #000;
    text-align: center;
    border-radius: 16px 16px 0 0;
}

.tj-results-title {
    font-size: 24px;
    font-weight: 800;
    margin: 0 0 8px 0;
}

.tj-results-subtitle {
    font-size: 14px;
    opacity: 0.8;
}

.tj-results-body {
    padding: 20px;
}

.tj-result-card {
    background: #FAFAFA;
    border: 1px solid #F0F0F0;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
    text-align: center;
}

.tj-result-emoji {
    font-size: 36px;
    margin-bottom: 8px;
}

.tj-result-label {
    font-size: 11px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.tj-result-value {
    font-size: 24px;
    font-weight: 700;
    color: #0A0A0A;
    margin-bottom: 8px;
}

.tj-result-desc {
    font-size: 12px;
    color: #666;
    line-height: 1.4;
}

.tj-close-results {
    width: 100%;
    padding: 12px;
    background: #E8FF00;
    color: #000;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 15px;
}

/* Desktop Optimizations */
@media (min-width: 768px) {
    .tj-header {
        padding: 30px 20px 20px;
    }
    
    .tj-title {
        font-size: 32px;
    }
    
    .tj-subtitle {
        font-size: 15px;
    }
    
    .tj-phase-indicator {
        font-size: 13px;
    }
    
    .tj-progress-container {
        padding: 20px;
    }
    
    .tj-progress-overview {
        grid-template-columns: repeat(4, 1fr);
        gap: 15px;
        margin-bottom: 20px;
    }
    
    .tj-stat-value {
        font-size: 24px;
    }
    
    .tj-stat-label {
        font-size: 11px;
    }
    
    .tj-progress-bar-wrapper {
        height: 8px;
    }
    
    .tj-phases-nav {
        padding: 15px 10px;
        gap: 8px;
        scrollbar-width: thin;
        scrollbar-color: #E5E5E5 #FAFAFA;
    }
    
    .tj-phases-nav::-webkit-scrollbar {
        display: block;
        height: 6px;
    }
    
    .tj-phases-nav::-webkit-scrollbar-track {
        background: #FAFAFA;
    }
    
    .tj-phases-nav::-webkit-scrollbar-thumb {
        background: #E5E5E5;
        border-radius: 3px;
    }
    
    .tj-phase-btn {
        padding: 12px 18px;
        font-size: 13px;
        gap: 10px;
    }
    
    .tj-phase-btn:hover {
        background: #FFFEF0;
        border-color: #D0E800;
        color: #333;
        transform: translateY(-1px);
        box-shadow: 0 3px 6px rgba(0, 0, 0, 0.08);
    }
    
    .tj-phase-icon {
        font-size: 18px;
    }
    
    .tj-phase-name {
        font-size: 13px;
    }
    
    .tj-phase-days {
        font-size: 10px;
    }
    
    .tj-phase-progress {
        height: 3px;
    }
    
    .tj-content {
        padding: 25px;
        min-height: 500px;
    }
    
    .tj-phase-header {
        margin-bottom: 25px;
        padding-bottom: 15px;
    }
    
    .tj-phase-title {
        font-size: 24px;
    }
    
    .tj-phase-desc {
        font-size: 14px;
    }
    
    .tj-checkpoint {
        padding: 20px;
        margin-bottom: 20px;
    }
    
    .tj-checkpoint:hover {
        background: #FFFEF0;
        border-color: #E8FF00;
        box-shadow: 0 2px 8px rgba(232, 255, 0, 0.15);
    }
    
    .tj-checkpoint-header {
        margin-bottom: 15px;
    }
    
    .tj-checkpoint-title {
        font-size: 16px;
    }
    
    .tj-checkpoint-count {
        padding: 4px 10px;
        font-size: 11px;
    }
    
    .tj-task {
        padding: 12px 10px;
    }
    
    .tj-task:hover {
        background: rgba(232, 255, 0, 0.05);
        border-radius: 6px;
    }
    
    .tj-checkbox-wrapper {
        margin-right: 14px;
    }
    
    .tj-checkbox-custom {
        width: 20px;
        height: 20px;
        border-radius: 6px;
    }
    
    .tj-checkbox:checked ~ .tj-checkbox-custom {
        transform: scale(1.1);
    }
    
    .tj-checkbox-custom::after {
        font-size: 12px;
    }
    
    .tj-task-label {
        font-size: 14px;
        line-height: 1.5;
    }
    
    .tj-priority-tag {
        padding: 4px 10px;
        font-size: 10px;
    }
    
    /* Weitere Desktop-Styles... */
}