/* AMD Menu PRO - Frontend Styles (Light Mode) */
/* Archivo: assets/css/frontend.css */

.amd-menu-pro {
    position: fixed;
    left: 0;
    top: 0;
    margin: 0 !important;
    padding: 0 !important;
    height: 100vh;
    z-index: 9999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.amd-menu-container {
    box-sizing: border-box;
    width: 80px;
    height: 100%;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 0;
    box-shadow: 2px 0 10px rgba(0,0,0,0.08);
    border-right: 1px solid #e5e7eb;
}

/* Logo */
.amd-menu-logo {
    width: 50px;
    height: 50px;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
    border-radius: 12px;
    padding: 0;
    overflow: hidden;
}

.amd-menu-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Navigation */
.amd-menu-nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
    padding: 0 15px;
}

/* Menu Items */
.amd-menu-item {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 2px solid transparent;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    cursor: pointer;
    text-decoration: none;
    margin: 0 auto;
}

.amd-menu-item:hover {
    background: #f3f4f6;
    border-color: #e5e7eb;
    transform: translateX(5px);
}

.amd-menu-item.amd-active {
    background: linear-gradient(135deg, #eea58a 0%, #d88c70 100%);
    border-color: #eea58a;
    box-shadow: 0 4px 5px #926846;
}

.amd-menu-item.amd-active::before {
    content: '';
    position: absolute;
    left: -15px;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 30px;
    background: linear-gradient(135deg, #eea58a 0%, #d88c70 100%);
    border-radius: 0 4px 4px 0;
}

.amd-item-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.amd-item-icon img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    opacity: 0.6;
    transition: opacity 0.3s ease;
    display: block;
}

.amd-item-text {
    display: none;
}

.amd-menu-item:hover .amd-item-icon img {
    opacity: 0.8;
}

.amd-menu-item.amd-active .amd-item-icon img {
    opacity: 1;
    filter: brightness(0) invert(1);
}

/* Tooltip */
.amd-menu-item::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    background: #1f2937;
    color: #fff;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    margin-left: 15px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, margin-left 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 10000;
}

.amd-menu-item:hover::after {
    opacity: 1;
    margin-left: 20px;
}

/* User Avatar */
.amd-menu-user {
    margin-top: auto;
    padding-top: 20px;
}

.amd-user-avatar {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
    border: 2px solid #e5e7eb;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.amd-user-avatar:hover {
    transform: scale(1.05);
    border-color: #d1d5db;
    background: #e5e7eb;
}

.amd-user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.amd-user-avatar.amd-guest {
    background: #f9fafb;
}

.amd-user-avatar.amd-guest svg {
    width: 24px;
    height: 24px;
}

.amd-user-avatar.amd-guest svg circle,
.amd-user-avatar.amd-guest svg path {
    stroke: #9ca3af;
}

/* User Tooltip */
.amd-user-avatar::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    background: #1f2937;
    color: #fff;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    margin-left: 15px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, margin-left 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 10000;
}

.amd-user-avatar:hover::after {
    opacity: 1;
    margin-left: 20px;
}

/* Logout Button */
.amd-logout-btn {
    box-sizing: border-box;
    width: 50px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #7d87c4;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    margin-bottom: 10px;
    color: #ffffff;
    font-size: 11px;
    font-weight: 600;
    text-decoration: none;
    padding: 0 4px;
}

.amd-logout-btn:hover {
    background: #6b75b0;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(125, 135, 196, 0.4);
}

.amd-logout-btn svg {
    display: none;
}

/* Toggle Button para Móviles */
.amd-menu-toggle {
    display: none;
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    width: 45px;
    height: 45px;
    background: #7d87c4;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
}

.amd-menu-toggle:hover {
    background: #6b75b0;
    transform: scale(1.05);
}

.amd-menu-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: #ffffff;
    margin: 5px auto;
    transition: all 0.3s ease;
    border-radius: 2px;
}

/* Animation for active state */
@keyframes pulse {
    0%, 100% {
        box-shadow: 0 4px 15px rgba(249, 115, 22, 0.25);
    }
    50% {
        box-shadow: 0 4px 25px rgba(249, 115, 22, 0.4);
    }
}

.amd-menu-item.amd-active {
    animation: pulse 2s ease-in-out infinite;
}

/* Responsive Desktop/Tablet */
@media (max-width: 1024px) {
    .amd-menu-container {
        width: 70px;
    }
}

/* Responsive Mobile */
@media (max-width: 768px) {
    .amd-menu-toggle,
    .amd-menu-overlay,
    .amd-menu-logo,
    .amd-menu-user {
        display: none !important;
    }
    
    body {
        padding-left: 0 !important;
        padding-bottom: 90px !important; /* Make room for bottom bar */
    }
    
    .amd-menu-pro {
        position: fixed;
        top: auto !important;
        bottom: 15px !important;
        left: 50% !important;
        transform: translateX(-50%);
        width: 92% !important;
        height: auto !important;
        z-index: 9999;
    }
    
    .amd-menu-container {
        flex-direction: row;
        width: 100%;
        height: 70px;
        padding: 0 10px;
        border-right: none;
        border-radius: 20px;
        justify-content: center;
        align-items: center;
    }
    
    .amd-menu-nav {
        flex-direction: row;
        width: 100%;
        height: 100%;
        padding: 0;
        gap: 0;
        justify-content: space-between;
        align-items: center;
    }
    
    .amd-menu-item {
        width: auto;
        flex: 1;
        height: 100%;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        border: none !important;
        background: transparent !important;
        box-shadow: none !important;
        padding: 0;
        margin: 0;
    }
    
    .amd-menu-item:hover {
        transform: none;
        background: transparent !important;
        border: none !important;
    }
    
    .amd-item-icon {
        width: 32px;
        height: 32px;
        border-radius: 16px;
        margin-bottom: 4px;
        transition: all 0.3s ease;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .amd-item-icon img {
        width: 18px;
        height: 18px;
        opacity: 0.5;
    }
    
    .amd-item-text {
        display: block;
        font-size: 11px;
        font-weight: 600;
        color: #9ca3af;
        transition: all 0.3s ease;
    }
    
    .amd-menu-item.amd-active .amd-item-icon img {
        opacity: 1 !important;
        filter: brightness(0) invert(1) !important;
    }
    
    .amd-menu-item.amd-active::before {
        display: none !important;
    }
    
    .amd-menu-item::after {
        display: none !important;
    }
}

/* Responsive Mobile Pequeño */
@media (max-width: 480px) {
    .amd-menu-pro {
        width: 95% !important;
        bottom: 10px !important;
    }
    
    .amd-item-text {
        font-size: 10px;
    }
}
