/* Battlefield positioning and unit presentation live in combat.css.
   This file now only owns tactical interaction overlays and skill selection. */

.dodge-highlight .unit-focus-ring {
    border-color: #9ae0a8 !important;
    box-shadow: 0 0 24px rgba(102, 210, 128, 0.72) !important;
}

/* /* Tactical Skill Selection Overlay (Glassmorphism) */
.tactical-skill-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10001;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
    width: 100%; /* Cover area to simplify centering logic */
    height: 100%;
}

.tactical-skill-container {
    background: rgba(30, 30, 35, 0.95);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    padding: 24px;
    width: 480px;
    height: 420px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), inset 0 0 0 1px rgba(255, 255, 255, 0.05);
    animation: fadeInScale 0.25s ease-out forwards;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
}

.tactical-skill-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 12px;
}

.tactical-skill-header h3 {
    margin: 0;
    font-size: 1.2rem;
    color: var(--gold);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    font-weight: 800;
}

.return-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.2s;
}

.return-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.tactical-skill-slots {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 24px;
    flex: 1;
}

.tactical-skill-slot {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 12px;
    height: 80px; /* Fixed height for all slots */
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
}

.tactical-skill-slot:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: var(--gold);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.tactical-skill-slot.dragging {
    opacity: 0.5;
    border: 1px dashed var(--gold);
}

.tactical-skill-slot.drag-over {
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid var(--gold) !important;
    transform: scale(1.02);
}

.tactical-skill-slot.empty {
    justify-content: center;
    flex-direction: column;
    border: 2px dashed rgba(255, 255, 255, 0.1);
    gap: 2px;
}

.slot-plus {
    font-size: 1.6rem;
    color: rgba(255, 255, 255, 0.2);
    line-height: 1;
}

.slot-label {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.2);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.tactical-skill-slot.filled .skill-icon {
    width: 44px;
    height: 44px;
    background-size: cover;
    border-radius: 6px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    flex-shrink: 0;
}

.tactical-skill-slot.filled .skill-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow: hidden;
}

.skill-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: #eee;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.skill-cost {
    font-size: 0.8rem;
    color: #4db8ff;
    font-weight: 600;
}

.unequip-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(244, 67, 54, 0.8);
    color: white;
    border: none;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    opacity: 0;
    transition: all 0.2s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.tactical-skill-slot:hover .unequip-btn {
    opacity: 1;
}

.unequip-btn:hover {
    transform: scale(1.2);
    background: #f44336;
    opacity: 1 !important;
}

.tactical-skill-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.apply-btn {
    width: 100%;
    padding: 12px !important;
    font-weight: 800 !important;
    letter-spacing: 2px;
    background: linear-gradient(135deg, #4caf50 0%, #2e7d32 100%) !important;
    border: none !important;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3) !important;
}

.apply-btn:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4) !important;
}

/* Selection Overlay (now content of container) */
.tactical-skill-selection-overlay {
    height: 100%;
    display: flex;
    flex-direction: column;
    animation: slideIn 0.2s ease-out;
}

.selection-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 12px;
}

.selection-header h4 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.selection-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-right: 8px; /* space for scrollbar */
}

/* Custom Scrollbar for list */
.selection-list::-webkit-scrollbar {
    width: 6px;
}
.selection-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.selection-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.selection-item:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--primary);
    transform: translateX(4px);
}

.item-icon {
    width: 40px;
    height: 40px;
    background-size: cover;
    border-radius: 6px;
    flex-shrink: 0;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

.item-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.item-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
}

.item-desc {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.3;
}

@keyframes fadeInScale {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(10px); }
    to { opacity: 1; transform: translateX(0); }
}
