/* توزيع الفرق */
.name-item.selected {
    background-color: #fff;
    color: #333;
    border-color: #4f46e5;
    box-shadow: 0 0 15px rgba(79, 70, 229, 0.5);
    transform: scale(1.05);
}

.name-item.dragging { opacity: 0.55; }
.team-column.drag-over,
#unorganized.drag-over { border-color: #fff; background-color: rgba(255, 255, 255, 0.22); }

.custom-modal {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.5);
    display: flex; justify-content: center; align-items: center; z-index: 2000;
}
.custom-modal .modal-content {
    background: white; padding: 2rem; border-radius: 10px; max-width: 400px; width: 90%;
}

@media (min-width: 1024px) {
    .team-layout-2 { display: grid; grid-template-columns: repeat(2, 1fr); grid-auto-rows: 1fr; gap: 1rem; }
    .team-layout-3 { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-flow: column; }
    .team-layout-4 { display: grid; grid-template-columns: repeat(2, 1fr); grid-template-rows: repeat(2, 1fr); gap: 1rem; }
    .team-layout-5 { display: flex; flex-wrap: wrap; }
    .team-layout-5 > div { flex: 1 1 30%; min-width: 200px; }
    .team-layout-6 { display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(2, 1fr); gap: 1rem; }
}

@media (max-width: 1023px) {
    #teamsContainer > div { min-width: 256px; width: 256px; flex-shrink: 0; }
    .team-column { height: auto !important; min-height: 16rem; max-height: none !important; overflow-y: visible !important; padding-top: 1rem; padding-bottom: 1rem; }
}

@media (min-width: 1024px) {
    #teamsContainer.team-layout-3 .team-column,
    #teamsContainer.team-layout-2 .team-column { height: auto; min-height: 24rem; max-height: 80vh; }
    #teamsContainer.team-layout-4 .team-column { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: auto; gap: 0.5rem; overflow-y: auto; align-content: flex-start; }
}

.remove-btn {
    color: rgb(252 165 165);
    padding: 0.25rem;
    width: 1.5rem;
    height: 1.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
    background: transparent;
    border: 0;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    font-weight: bold;
}
.remove-btn:hover { color: rgb(254 202 202); }
