/* 
   Field-Remove-Button Styles
   Optimierter Entfernen-Button direkt im Spielfeld
*/

/* Entfernen-Button auf dem Spielfeld */
.remove-player-button {
    /* Standard: absolute im Feld. Wenn außerhalb genutzt, wird unten überschrieben */
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    background: linear-gradient(145deg, #ef4444, #dc2626);
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(220, 38, 38, 0.3);
    transition: all 0.3s ease;
    opacity: 0.7;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    
    /* Größerer Klickbereich für bessere Erreichbarkeit */
    min-width: 120px;
    min-height: 40px;
}

/* Icon innerhalb des Buttons */
.remove-player-button::before {
    content: "✕";
    font-size: 18px;
    font-weight: bold;
}

/* Hover-Effekt */
.remove-player-button:hover {
    transform: translateX(-50%) scale(1.05);
    box-shadow: 0 6px 12px rgba(220, 38, 38, 0.4);
}

/* Aktiver Zustand (Spieler ausgewählt) */
.remove-player-button.active {
    opacity: 1;
    background: linear-gradient(145deg, #ef4444, #dc2626);
}

/* Drag & Drop Effekte */
.remove-player-button.drag-over {
    opacity: 1;
    transform: translateX(-50%) scale(1.05);
    background: linear-gradient(145deg, #dc2626, #b91c1c);
    box-shadow: 0 0 12px rgba(220, 38, 38, 0.35);
}

/* Aktiver Zustand während Drag & Drop Operation */
.remove-player-button.drag-active {
    opacity: 0.9;
    transform: translateX(-50%) scale(1.1);
    box-shadow: 0 6px 15px rgba(220, 38, 38, 0.4);
}

/* Verbesserte Animation für den Button */
/* Puls-Animation deaktiviert */
/* @keyframes pulse-remove-button { } */

/* Animation für Drag-Over Zustand */
/* Glow-Animation deaktiviert */
/* @keyframes glow-remove-button { } */

/* Shake-Animation für Button wenn kein Spieler ausgewählt ist */
.shake-animation {
    animation: shake 0.5s;
}

@keyframes shake {
    0%, 100% { transform: translateX(-50%); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-52%); }
    20%, 40%, 60%, 80% { transform: translateX(-48%); }
}

/* Modal für die Entfernen-Bestätigung */
.remove-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1500;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease-in-out;
}

.remove-modal.show {
    opacity: 1;
    visibility: visible;
}

.remove-modal-content {
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 450px;
    text-align: center;
    transform: translateY(-20px);
    transition: transform 0.3s ease-in-out;
}

.remove-modal.show .remove-modal-content {
    transform: translateY(0);
}

.remove-modal h3 {
    margin-top: 0;
    color: #1e293b;
    font-size: 22px;
}

.remove-modal p {
    margin-bottom: 25px;
    color: #475569;
    font-size: 16px;
}

.remove-modal-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.remove-modal-button {
    padding: 10px 25px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.2s ease;
}

.remove-button-confirm {
    background-color: #dc2626;
    color: white;
    border: none;
}

.remove-button-confirm:hover {
    background-color: #b91c1c;
}

.remove-button-cancel {
    background-color: #f3f4f6;
    color: #1e293b;
    border: 1px solid #d1d5db;
}

.remove-button-cancel:hover {
    background-color: #e5e7eb;
}

.close-modal {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
    color: #9ca3af;
    background: none;
    border: none;
    transition: color 0.2s ease;
}

.close-modal:hover {
    color: #4b5563;
}

/* Variante: Button unterhalb des Spielfeld-Bildes */
.field-wrapper > .remove-player-button {
    position: static;       /* aus dem Fluss, absolute aufheben */
    transform: none;        /* Zentrierung per Flex */
    margin: 10px 0 0 0;     /* Abstand zum Bild */
    align-self: center;     /* mittig unter dem Bild */
}

/* Responsive Design für kleinere Bildschirme */
@media (max-width: 768px) {
    .remove-player-button {
        padding: 12px 24px;
        font-size: 18px;
    }
    
    .remove-modal-content {
        padding: 20px;
    }
}