/**
 * Wimakeit LoginAsCustomer Module - Sticky Bar Styles
 */

/*
 * Magento core LAC bar fix:
 * .lac-notification-icon / -text / -links are float-based in core CSS.
 * Their parent .top-container must clear/neutralize floats, otherwise
 * floats overflow into the next body sibling (.page-wrapper) and offset
 * the whole page horizontally (~390px on the left).
 * Forcing flex layout on .top-container makes children flex items,
 * which neutralizes float on flex items per spec.
 */
.lac-notification .top-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.wimakeit-lac-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 99999;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    padding: 10px 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    font-size: 14px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.lac-bar-content {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    max-width: 1200px;
    margin: 0 auto;
    flex-wrap: wrap;
}

.lac-icon {
    display: flex;
    align-items: center;
    opacity: 0.9;
}

.lac-admin-info {
    display: flex;
    align-items: center;
    gap: 5px;
}

.lac-admin-info strong {
    font-weight: 600;
}

.lac-timer {
    background: rgba(255, 255, 255, 0.2);
    padding: 5px 12px;
    border-radius: 4px;
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
    font-size: 13px;
    min-width: 60px;
    text-align: center;
    backdrop-filter: blur(4px);
}

.lac-timeout-info {
    font-size: 12px;
    opacity: 0.85;
}

.lac-session-countdown {
    background: rgba(255, 255, 255, 0.2);
    padding: 5px 12px;
    border-radius: 4px;
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
    font-size: 13px;
    min-width: 70px;
    text-align: center;
    backdrop-filter: blur(4px);
    transition: background 0.3s ease;
}

.lac-session-countdown.lac-warning {
    background: rgba(255, 107, 107, 0.4);
    animation: lacCountdownPulse 1s infinite;
}

@keyframes lacCountdownPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

.lac-return-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #ffffff;
    color: #667eea;
    padding: 6px 16px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.lac-return-btn:hover {
    background: #f0f0f0;
    color: #5a67d8;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    text-decoration: none;
}

.lac-return-btn:active {
    transform: translateY(0);
}

.lac-return-btn svg {
    flex-shrink: 0;
}

/* Adjust body padding to prevent content being hidden behind sticky bar */
body.lac-bar-active {
    padding-top: 48px !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .wimakeit-lac-bar {
        padding: 8px 15px;
    }

    .lac-bar-content {
        gap: 10px;
        font-size: 12px;
    }

    .lac-timer {
        padding: 4px 8px;
        font-size: 11px;
    }

    .lac-return-btn {
        padding: 5px 12px;
        font-size: 12px;
    }

    .lac-admin-info {
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .lac-bar-content {
        flex-direction: column;
        gap: 8px;
    }

    .lac-icon {
        display: none;
    }
}
