/**
 * mobile-inventory-menu.css
 * Estilos para o menu de inventário alternativo em formato de lista para dispositivos móveis
 */

.mobile-inventory-button {
    position: fixed;
    bottom: 100px;
    right: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: rgba(61, 43, 43, 0.9);
    border: 2px solid #6b2a2a;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5), 0 0 20px rgba(107, 42, 42, 0.3);
    cursor: pointer;
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.2s, background-color 0.2s;
}

.mobile-inventory-button::before {
    content: '';
    width: 30px;
    height: 30px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white"><path d="M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-7 14h-2v-2h2v2zm0-4h-2V7h2v6z"/></svg>');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.mobile-inventory-button.active {
    background-color: #6b2a2a;
    transform: scale(1.1);
}

.mobile-inventory-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: #ff6b6b;
    color: white;
    font-size: 12px;
    font-weight: bold;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 107, 107, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(255, 107, 107, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 107, 107, 0);
    }
}

.mobile-inventory-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 9998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.mobile-inventory-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.mobile-inventory-menu {
    position: fixed;
    bottom: 170px;
    right: 20px;
    width: 80%;
    max-width: 300px;
    max-height: 60vh;
    overflow-y: auto;
    background-color: rgba(30, 30, 30, 0.95);
    border: 2px solid #6b2a2a;
    border-radius: 8px;
    padding: 15px;
    z-index: 9999;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.7);
    transform-origin: bottom right;
    transform: scale(0);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mobile-inventory-menu.active {
    transform: scale(1);
    opacity: 1;
}

.mobile-inventory-title {
    color: #ff6b6b;
    font-size: 1.2em;
    font-weight: bold;
    text-align: center;
    margin-bottom: 10px;
    border-bottom: 1px solid #6b2a2a;
    padding-bottom: 5px;
}

.mobile-inventory-empty {
    color: #888;
    text-align: center;
    padding: 20px 0;
    font-style: italic;
}

.mobile-inventory-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background-color: rgba(61, 43, 43, 0.6);
    border: 1px solid #5a3e3e;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s;
    touch-action: manipulation;
    position: relative;
}

.mobile-inventory-item:active {
    background-color: rgba(107, 42, 42, 0.8);
    transform: scale(0.98);
}

.mobile-inventory-item-icon {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
    border: 1px solid #6b2a2a;
}

.mobile-inventory-item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.mobile-inventory-item-name {
    font-weight: bold;
    color: #ff6b6b;
    font-size: 0.9em;
}

.mobile-inventory-item-desc {
    font-size: 0.8em;
    color: #ccc;
    line-height: 1.2;
}

.mobile-inventory-item-use {
    background-color: rgba(107, 42, 42, 0.8);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.8em;
    font-weight: bold;
    text-align: center;
    margin-left: auto;
    transition: background-color 0.2s;
}

.mobile-inventory-item:active .mobile-inventory-item-use {
    background-color: rgba(139, 0, 0, 0.9);
}

/* Estilo para notificações de inventário */
.mobile-notification-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    z-index: 10001;
}

.mobile-inventory-notification {
    position: relative;
    background-color: rgba(30, 30, 30, 0.95);
    border: 2px solid #6b2a2a;
    border-radius: 8px;
    padding: 15px 20px;
    color: #ff6b6b;
    font-size: 0.9em;
    text-align: center;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.7);
    opacity: 1;
    transition: opacity 0.3s;
    animation: notification-appear 0.3s ease-out;
}

@keyframes notification-appear {
    0% { transform: scale(0.7); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.mobile-inventory-item-details {
    flex: 1;
}

.mobile-inventory-item-name {
    color: white;
    font-weight: bold;
    margin-bottom: 3px;
}

.mobile-inventory-item-description {
    color: #ccc;
    font-size: 0.85em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.mobile-inventory-use-button {
    background-color: #6b2a2a;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.2s;
    margin-top: 5px;
    touch-action: manipulation;
}

.mobile-inventory-use-button:active {
    background-color: #8b3a3a;
}

/* Overlay para fechar o menu ao tocar fora */
.mobile-inventory-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.mobile-inventory-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* Animação de pulso para o botão */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.mobile-inventory-button.has-items {
    animation: pulse 2s infinite;
}

/* Estilo para o contador de itens */
.mobile-inventory-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: #ff6b6b;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
}

/* Responsividade para telas menores */
@media (max-width: 480px) {
    .mobile-inventory-menu {
        width: 90%;
        right: 5%;
        left: 5%;
        max-width: none;
    }
    
    .mobile-inventory-button {
        bottom: 90px;
        right: 15px;
    }
}