/* ============================================
   Tutorial Assistent Styles
   ============================================ */

/* Tutorial Button in Navigation */
.tutorial-button {
    position: relative;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0.5rem;
}

.tutorial-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.tutorial-button i {
    font-size: 1rem;
}

.tutorial-button.compact {
    padding: 0.375rem 0.75rem;
    font-size: 0.8rem;
}

/* Tutorial Badge für neue User */
.tutorial-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ef4444;
    color: white;
    font-size: 0.65rem;
    padding: 0.15rem 0.4rem;
    border-radius: 10px;
    font-weight: 600;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

/* Beta User Warning in Tutorial */
.tutorial-beta-warning {
    background: #fef3c7;
    border: 1px solid #fbbf24;
    border-radius: 6px;
    padding: 0.75rem;
    margin-top: 1rem;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #78350f;
}

.tutorial-beta-warning i {
    color: #f59e0b;
    font-size: 1.25rem;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.tutorial-beta-warning strong {
    font-weight: 600;
}

/* Shepherd.js Theme Customization */
.shepherd-modal-overlay-container {
    z-index: 9998;
}

.shepherd-element {
    z-index: 9999;
    max-width: 400px;
}

.shepherd-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem 1.25rem;
    border-radius: 8px 8px 0 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.shepherd-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
    color: white;
}

.shepherd-cancel-icon {
    color: white;
    opacity: 0.8;
    transition: opacity 0.2s;
    cursor: pointer;
    background: none;
    border: none;
    font-size: 1.5rem;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.shepherd-cancel-icon:hover {
    opacity: 1;
}

.shepherd-text {
    padding: 1.25rem;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #374151;
}

.shepherd-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 0 0 8px 8px;
}

.shepherd-progress {
    font-size: 0.85rem;
    color: #6b7280;
    font-weight: 500;
}

.shepherd-button {
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.shepherd-button-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.shepherd-button-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.shepherd-button-secondary {
    background: transparent;
    color: #6b7280;
    border: 1px solid #d1d5db;
}

.shepherd-button-secondary:hover {
    background: #f9fafb;
}

.shepherd-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Highlight effect for tutorial targets */
.shepherd-target {
    animation: highlightPulse 2s ease-in-out infinite;
}

@keyframes highlightPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.4);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(102, 126, 234, 0.1);
    }
}

/* Tutorial Welcome Screen */
.tutorial-welcome {
    text-align: center;
    padding: 2rem 1.5rem;
}

.tutorial-welcome-icon {
    font-size: 3rem;
    color: #667eea;
    margin-bottom: 1rem;
}

.tutorial-welcome h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.75rem;
}

.tutorial-welcome p {
    font-size: 1rem;
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.tutorial-welcome-features {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    text-align: left;
}

.tutorial-feature-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    background: #f9fafb;
    border-radius: 6px;
}

.tutorial-feature-item i {
    color: #667eea;
    font-size: 1.25rem;
}

.tutorial-feature-item span {
    color: #374151;
    font-size: 0.9rem;
}

/* Tutorial Completion Screen */
.tutorial-complete {
    text-align: center;
    padding: 2rem 1.5rem;
}

.tutorial-complete-icon {
    font-size: 3.5rem;
    color: #10b981;
    margin-bottom: 1rem;
}

.tutorial-complete h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.75rem;
}

.tutorial-complete p {
    font-size: 1rem;
    color: #6b7280;
    line-height: 1.6;
}

/* Mobile Responsive - Kleinere Box, intelligente Positionierung */
@media (max-width: 768px) {
    /* Box deutlich kleiner */
    .shepherd-element {
        max-width: 82vw !important;
        min-width: 260px;
    }
    
    /* Header kompakter */
    .shepherd-header {
        padding: 0.65rem 0.875rem;
    }
    
    .shepherd-title {
        font-size: 0.95rem;
        line-height: 1.3;
    }
    
    .shepherd-cancel-icon {
        width: 20px;
        height: 20px;
        font-size: 1.2rem;
    }
    
    /* Text kompakter */
    .shepherd-text {
        padding: 0.875rem;
        font-size: 0.825rem;
        line-height: 1.45;
    }
    
    /* Footer kompakter */
    .shepherd-footer {
        padding: 0.65rem 0.875rem;
        flex-wrap: wrap;
        gap: 0.4rem;
    }
    
    .shepherd-progress {
        font-size: 0.75rem;
        width: 100%;
        text-align: center;
        margin-top: 0.25rem;
    }
    
    .shepherd-button {
        font-size: 0.75rem;
        padding: 0.35rem 0.7rem;
    }
    
    /* Welcome/Complete Screens kompakter */
    .tutorial-welcome,
    .tutorial-complete {
        padding: 1rem 0.875rem;
    }
    
    .tutorial-welcome-icon {
        font-size: 2.25rem;
        margin-bottom: 0.75rem;
    }
    
    .tutorial-complete-icon {
        font-size: 2.5rem;
        margin-bottom: 0.75rem;
    }
    
    .tutorial-welcome h2,
    .tutorial-complete h2 {
        font-size: 1.05rem;
        margin-bottom: 0.5rem;
    }
    
    .tutorial-welcome p,
    .tutorial-complete p {
        font-size: 0.825rem;
        line-height: 1.45;
        margin-bottom: 1rem;
    }
    
    /* Beta Warning kompakter */
    .tutorial-beta-warning {
        padding: 0.5rem;
        font-size: 0.75rem;
        margin-top: 0.65rem;
        gap: 0.4rem;
    }
    
    .tutorial-beta-warning i {
        font-size: 0.95rem;
    }
    
    /* Feature Items kleiner */
    .tutorial-feature-item {
        padding: 0.4rem;
        gap: 0.5rem;
    }
    
    .tutorial-feature-item i {
        font-size: 1rem;
    }
    
    .tutorial-feature-item span {
        font-size: 0.8rem;
    }
    
    /* INTELLIGENTE POSITIONIERUNG für Mobile */
    /* Box erscheint ÜBER dem Element, wenn es unten ist */
    .shepherd-element[data-popper-placement^="bottom"] {
        margin-top: 8px !important;
    }
    
    /* Box erscheint UNTER dem Element, wenn es oben ist */
    .shepherd-element[data-popper-placement^="top"] {
        margin-bottom: 8px !important;
    }
    
    /* Links/Rechts-Positioning wird auf Mobile zu Top/Bottom umgewandelt */
    .shepherd-element[data-popper-placement^="right"],
    .shepherd-element[data-popper-placement^="left"] {
        /* Shepherd.js wählt automatisch top/bottom basierend auf verfügbarem Platz */
    }
    
    /* Reduzierter Abstand zum Target-Element */
    .shepherd-element .shepherd-arrow {
        display: none; /* Pfeil auf Mobile ausblenden für mehr Platz */
    }
}

/* Extra kleine Bildschirme - noch kompakter */
@media (max-width: 480px) {
    .shepherd-element {
        max-width: 88vw !important;
        min-width: 240px;
    }
    
    .shepherd-header {
        padding: 0.55rem 0.75rem;
    }
    
    .shepherd-title {
        font-size: 0.875rem;
    }
    
    .shepherd-text {
        padding: 0.75rem;
        font-size: 0.775rem;
    }
    
    .shepherd-footer {
        padding: 0.55rem 0.75rem;
    }
    
    .shepherd-button {
        font-size: 0.7rem;
        padding: 0.3rem 0.6rem;
    }
    
    .tutorial-welcome h2,
    .tutorial-complete h2 {
        font-size: 0.975rem;
    }
    
    .tutorial-welcome p,
    .tutorial-complete p {
        font-size: 0.775rem;
    }
    
    .tutorial-beta-warning {
        font-size: 0.7rem;
        padding: 0.45rem;
    }
}

/* RTL Support */
[dir="rtl"] .tutorial-button {
    flex-direction: row-reverse;
}

[dir="rtl"] .tutorial-badge {
    right: auto;
    left: -8px;
}

[dir="rtl"] .tutorial-feature-item {
    flex-direction: row-reverse;
}

[dir="rtl"] .shepherd-footer {
    flex-direction: row-reverse;
}

[dir="rtl"] .tutorial-beta-warning {
    flex-direction: row-reverse;
}

/* Accessibility */
.shepherd-element:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

.shepherd-button:focus-visible {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Animation */
.shepherd-element {
    animation: fadeInScale 0.3s ease-out;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}
