/**
 * Estilos para el panel de hechizos
 */

/* Estilos para el panel lateral de hechizos */
.spells-toggle {
    margin-left: 5px;
    padding: 3px 8px;
    background: #5f3a80;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.7rem;
}

.spells-toggle:hover {
    background: #7d4ca6;
}

/* Lista de hechizos */
.spells-list {
    overflow-y: auto;
    margin-bottom: 10px;
    max-height: 250px;
    background-color: rgba(30, 30, 50, 0.5);
    border-radius: 5px;
    padding: 5px;
}

/* Mensaje de lista vacía */
.empty-message {
    text-align: center;
    padding: 20px;
    color: #888;
    font-style: italic;
}

/* Item de hechizo */
.spell-item {
    display: flex;
    align-items: center;
    padding: 8px;
    border-radius: 5px;
    margin-bottom: 5px;
    cursor: pointer;
    background-color: rgba(60, 60, 90, 0.5);
    position: relative;
}

.spell-item:hover {
    background-color: rgba(80, 80, 120, 0.7);
}

.spell-item.selected {
    background-color: rgba(100, 70, 140, 0.8);
    box-shadow: 0 0 8px rgba(138, 75, 175, 0.8);
}

/* Elementos dentro de los items de hechizo */
.spell-icon {
    font-size: 1.5rem;
    margin-right: 10px;
    width: 30px;
    text-align: center;
}

.spell-name {
    flex-grow: 1;
    font-weight: bold;
}

.spell-details {
    color: #b3b3cc;
    font-size: 0.85rem;
    margin-left: 5px;
}

.spell-hotkey {
    position: absolute;
    top: 5px;
    right: 5px;
    background-color: rgba(138, 75, 175, 0.7);
    color: white;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: bold;
}

/* Botones de acción */
.spells-actions {
    display: flex;
    justify-content: space-between;
    padding-top: 5px;
    margin-bottom: 10px;
}

.spells-actions button {
    padding: 5px 10px;
    background-color: #6a3b8a;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    flex-grow: 1;
    margin: 0 3px;
    font-size: 0.85rem;
}

.spells-actions button:hover {
    background-color: #8a4baf;
}

.spells-actions button:active {
    background-color: #5a2d7a;
}

/* Modificadores del cursor para selección de objetivo */
body.targeting {
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32"><circle cx="16" cy="16" r="12" fill="none" stroke="%238a4baf" stroke-width="2"/><circle cx="16" cy="16" r="2" fill="%238a4baf"/><line x1="16" y1="2" x2="16" y2="8" stroke="%238a4baf" stroke-width="2"/><line x1="16" y1="24" x2="16" y2="30" stroke="%238a4baf" stroke-width="2"/><line x1="2" y1="16" x2="8" y2="16" stroke="%238a4baf" stroke-width="2"/><line x1="24" y1="16" x2="30" y2="16" stroke="%238a4baf" stroke-width="2"/></svg>') 16 16, crosshair;
}

/* Visual effect for targeting mode */
body.targeting #gameCanvas {
    box-shadow: 0 0 20px rgba(138, 75, 175, 0.6);
    border: 2px solid #8a4baf;
}

/* Style for the cancel button in targeting mode */
#castSpellBtn.cancel-mode {
    background-color: #a33;
}

#castSpellBtn.cancel-mode:hover {
    background-color: #c33;
}

/* Barra de desplazamiento personalizada */
.spells-list::-webkit-scrollbar {
    width: 8px;
}

.spells-list::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}

.spells-list::-webkit-scrollbar-thumb {
    background: #6a3b8a;
    border-radius: 4px;
}

.spells-list::-webkit-scrollbar-thumb:hover {
    background: #8a4baf;
}
