/**
 * Order Status Tracker - Lebegő rendelés státusz gomb
 * Megjelenik a back-to-top gomb felett
 */

/* Fő gomb */
.order-status-tracker {
    position: fixed;
    bottom: 100px; /* back-to-top felett */
    right: 20px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%);
    color: white;
    cursor: pointer;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    opacity: 0;
    transform: scale(0.8) translateY(20px);
}

.order-status-tracker.visible {
    opacity: 1;
    transform: scale(1) translateY(0);
}

.order-status-tracker:hover {
    transform: scale(1.1) translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.order-status-tracker:active {
    transform: scale(0.95);
}

/* Ikon */
.order-status-icon {
    font-size: 24px;
    line-height: 1;
}

/* Badge (rendelések száma) */
.order-status-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 22px;
    height: 22px;
    border-radius: 11px;
    background: #dc3545;
    color: white;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    animation: badge-pop 0.3s ease;
}

@keyframes badge-pop {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* Tooltip */
.order-status-tooltip {
    position: absolute;
    right: 100%;
    top: 50%;
    transform: translateX(-100%) translateY(-50%) scale(0.8);
    background: rgba(0, 0, 0, 0.85);
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 13px;
    white-space: pre-line;
    line-height: 1.4;
    margin-right: 10px;
    opacity: 0;
    transition: all 0.2s ease;
    pointer-events: none;
    max-width: 200px;
    text-align: left;
}

.order-status-tooltip::after {
    content: '';
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%);
    border: 6px solid transparent;
    border-left-color: rgba(0, 0, 0, 0.85);
}

/* Pulzáló animáció - amikor elkészült a rendelés */
.order-status-tracker.pulse {
    animation: pulse-ready 1.5s ease-in-out infinite;
}

@keyframes pulse-ready {
    0% {
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3), 0 0 0 0 rgba(40, 167, 69, 0.7);
    }
    50% {
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3), 0 0 0 15px rgba(40, 167, 69, 0);
    }
    100% {
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3), 0 0 0 0 rgba(40, 167, 69, 0);
    }
}

/* Mobil nézet */
@media (max-width: 768px) {
    .order-status-tracker {
        bottom: 80px;
        right: 15px;
        width: 50px;
        height: 50px;
    }
    
    .order-status-icon {
        font-size: 20px;
    }
    
    .order-status-badge {
        min-width: 18px;
        height: 18px;
        font-size: 10px;
    }
    
    /* Tooltip mobilon balra */
    .order-status-tooltip {
        right: auto;
        left: 100%;
        margin-left: 10px;
        margin-right: 0;
    }
    
    .order-status-tooltip::after {
        right: auto;
        left: -6px;
        border-left-color: transparent;
        border-right-color: rgba(0, 0, 0, 0.85);
    }
}

/* Dark mode támogatás */
@media (prefers-color-scheme: dark) {
    .order-status-tracker {
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    }
    
    .order-status-tooltip {
        background: rgba(30, 30, 30, 0.95);
    }
    
    .order-status-tooltip::after {
        border-left-color: rgba(30, 30, 30, 0.95);
    }
}

/* Ha van dark-theme class a body-n */
body.dark-theme .order-status-tooltip,
[data-theme="dark"] .order-status-tooltip {
    background: rgba(30, 30, 30, 0.95);
}

body.dark-theme .order-status-tooltip::after,
[data-theme="dark"] .order-status-tooltip::after {
    border-left-color: rgba(30, 30, 30, 0.95);
}
