/**
 * Súgó és tutorial rendszer CSS stílusok
 */

/* Overlay - félátlátszó háttér */
.help-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 99998;
    transition: opacity 0.3s ease;
}

/* Kiemelt elem */
.help-highlighted {
    position: relative;
    z-index: 99999 !important;
    box-shadow: 0 0 0 4px #ffc107, 0 0 0 8px rgba(255, 193, 7, 0.3) !important;
    border-radius: 4px;
    animation: pulse-highlight 2s infinite;
}

@keyframes pulse-highlight {
    0%, 100% {
        box-shadow: 0 0 0 4px #ffc107, 0 0 0 8px rgba(255, 193, 7, 0.3);
    }
    50% {
        box-shadow: 0 0 0 4px #ffc107, 0 0 0 12px rgba(255, 193, 7, 0.5);
    }
}

/* Tooltip buborék */
.help-tooltip {
    position: fixed !important;
    background: white;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    z-index: 100000 !important;
    min-width: 300px;
    max-width: 500px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    transition: opacity 0.2s ease;
    will-change: transform, opacity;
}

/* Animáció csak amikor először jelenik meg */
.help-tooltip.help-tooltip-initial {
    animation: fadeIn 0.3s ease;
}

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

/* Tooltip header */
.help-tooltip-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 8px 8px 0 0;
}

.help-tooltip-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.help-tooltip-close {
    background: transparent;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    line-height: 1;
    border-radius: 50%;
    transition: background 0.2s;
}

.help-tooltip-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Tooltip tartalom */
.help-tooltip-content {
    padding: 20px;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #333;
    max-height: calc(90vh - 200px);
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

.help-tooltip-content strong {
    color: #667eea;
    font-weight: 600;
}

.help-tooltip-content br {
    margin-bottom: 0.5rem;
}

/* Tooltip footer */
.help-tooltip-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: #f8f9fa;
    border-radius: 0 0 8px 8px;
    gap: 10px;
}

.help-tooltip-progress {
    font-size: 0.85rem;
    color: #666;
    font-weight: 500;
}

/* Gombok */
.help-tooltip-prev,
.help-tooltip-next,
.help-tooltip-finish {
    transition: all 0.2s;
}

.help-tooltip-prev:hover,
.help-tooltip-next:hover,
.help-tooltip-finish:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Súgó gomb */
#helpButton {
    font-size: 1.1rem;
    transition: all 0.3s;
}

#helpButton:hover {
    transform: scale(1.1);
    box-shadow: 0 0 10px rgba(255, 193, 7, 0.5);
}

/* Sötét mód támogatás */
[data-theme="dark"] .help-tooltip {
    background: #2d3748;
    color: #e2e8f0;
}

[data-theme="dark"] .help-tooltip-content {
    color: #e2e8f0;
}

[data-theme="dark"] .help-tooltip-footer {
    background: #1a202c;
}

[data-theme="dark"] .help-tooltip-progress {
    color: #a0aec0;
}

[data-theme="dark"] .help-tooltip-content strong {
    color: #90cdf4;
}

/* Responsive design */
@media (max-width: 768px) {
    .help-tooltip {
        max-width: 90vw !important;
        min-width: 280px;
        max-height: 80vh !important;
    }
    
    .help-tooltip-content {
        max-height: calc(80vh - 180px) !important;
        font-size: 0.9rem;
        padding: 16px;
    }
    
    .help-tooltip-header {
        padding: 12px 16px;
    }
    
    .help-tooltip-title {
        font-size: 1rem;
    }
    
    .help-tooltip-footer {
        padding: 12px 16px;
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .help-tooltip-prev,
    .help-tooltip-next,
    .help-tooltip-finish {
        font-size: 0.85rem;
        padding: 0.25rem 0.5rem;
    }
    
    .help-tooltip-progress {
        flex-basis: 100%;
        text-align: center;
    }
}

/* Extra kicsi képernyők */
@media (max-width: 480px) {
    .help-tooltip {
        max-width: 95vw !important;
        min-width: 260px;
        max-height: 85vh !important;
    }
    
    .help-tooltip-content {
        max-height: calc(85vh - 160px) !important;
        font-size: 0.85rem;
        padding: 12px;
    }
    
    .help-tooltip-header {
        padding: 10px 12px;
    }
    
    .help-tooltip-title {
        font-size: 0.95rem;
    }
}

/* Scroll bar styling */
.help-tooltip-content::-webkit-scrollbar {
    width: 8px;
}

.help-tooltip-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.help-tooltip-content::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.help-tooltip-content::-webkit-scrollbar-thumb:hover {
    background: #555;
}

[data-theme="dark"] .help-tooltip-content::-webkit-scrollbar-track {
    background: #1a202c;
}

[data-theme="dark"] .help-tooltip-content::-webkit-scrollbar-thumb {
    background: #4a5568;
}

[data-theme="dark"] .help-tooltip-content::-webkit-scrollbar-thumb:hover {
    background: #718096;
}

/* Nyíl a tooltip-hoz (opcionális) */
.help-tooltip::before {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    border: 10px solid transparent;
    display: none; /* Alapból kikapcsolva, szükség esetén bekapcsolható */
}

.help-tooltip[data-position="top"]::before {
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    border-top-color: white;
}

.help-tooltip[data-position="bottom"]::before {
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    border-bottom-color: #667eea;
}

.help-tooltip[data-position="left"]::before {
    right: -20px;
    top: 50%;
    transform: translateY(-50%);
    border-left-color: white;
}

.help-tooltip[data-position="right"]::before {
    left: -20px;
    top: 50%;
    transform: translateY(-50%);
    border-right-color: white;
}

/* Animáció amikor új lépésre lépünk */
.help-tooltip.step-transition {
    animation: stepTransition 0.2s ease;
}

@keyframes stepTransition {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
    100% {
        opacity: 1;
    }
}

/* Kisebb ikonok és jelölések */
.help-tooltip-content ul {
    padding-left: 20px;
    margin: 10px 0;
}

.help-tooltip-content li {
    margin-bottom: 8px;
}

.help-tooltip-content code {
    background: #f4f4f4;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.9em;
    color: #e83e8c;
}

[data-theme="dark"] .help-tooltip-content code {
    background: #1a202c;
    color: #ff6b9d;
}

/* Alert stílusok a modal-ban */
.alert {
    border-radius: 6px;
    padding: 12px 16px;
}

.alert-info {
    background: #e7f3ff;
    border: 1px solid #b3d9ff;
    color: #004085;
}

[data-theme="dark"] .alert-info {
    background: #1e3a5f;
    border-color: #2c5282;
    color: #90cdf4;
}
