/* Source: battle-overlays-selection.css — split from consolidated CSS */

/* Bro Rogue - Battle: Selection Overlays */

/* Split from battle-overlays-actions.css */

/* Contains: Enemy Select (1) + Skills Move (2) + Fight Move (3) overlays */

/* ── ENEMY SELECT OVERLAY ────────────────────────────────── */
.enemySelectOverlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgb(0 0 0 / 80%);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.enemySelectOverlay.active {
    display: flex;
}

.enemySelectContainer {
    background-color: var(--background-color);
    border: 2px solid var(--primary-color);
    border-radius: 10px;
    padding: 20px;
    max-width: 500px;
    position: relative;
}

.enemySelectHeader {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 10px;
}

.enemySelectList {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.enemySelectButton {
    background: linear-gradient(135deg, var(--secondary-color), #3dbdb5);
    color: var(--text-color);
    border: none;
    padding: 15px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.15s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow:
        0 2px 6px rgb(0 0 0 / 25%),
        inset 0 1px 0 rgb(255 255 255 / 15%);
}

.enemySelectButton:hover {
    background: linear-gradient(135deg, var(--primary-color), #d94444);
    transform: translateY(-2px);
    box-shadow:
        0 4px 12px rgb(0 0 0 / 35%),
        inset 0 1px 0 rgb(255 255 255 / 20%);
}

.enemySelectButton:active {
    transform: translateY(1px) scale(0.98);
    box-shadow:
        0 1px 3px rgb(0 0 0 / 30%),
        inset 0 3px 6px rgb(0 0 0 / 30%);
    transition: all 0.05s ease;
}

.enemySelectInfo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.enemySprite {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.enemyDetails {
    text-align: left;
}

.enemyName {
    font-weight: bold;
    font-size: 1.1em;
}

.enemyHp {
    font-size: 0.9em;
    opacity: 0.8;
}

/* ── SKILLS MOVE SELECTION OVERLAY ───────────────────────── */
.skillsMoveOverlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgb(0 0 0 / 80%);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.skillsMoveOverlay.active {
    display: flex;
}

.skillsMoveContainer {
    background-color: var(--background-color);
    border: 2px solid var(--primary-color);
    border-radius: 10px;
    padding: 20px;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.skillsMoveHeader {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 10px;
}

.skillsMovesList {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

/* Skills move buttons */
.skillsMoveOverlay .moveButton {
    background-color: #2a2a2a;
    color: var(--text-color);
    border: 1px solid #444;
    border-left: 3px solid var(--secondary-color);
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.25s ease;
    text-align: left;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Hover: dark card with split red/blue accent bar */
.skillsMoveOverlay .moveButton:hover:not(.disabled) {
    background: linear-gradient(135deg, #2a2a2a, #1a1a1a);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgb(0 0 0 / 40%);
}

/* Red accent — top half of left edge (overlaps border area) */
.skillsMoveOverlay .moveButton:hover:not(.disabled)::before {
    content: '';
    position: absolute;
    left: -3px;
    top: 0;
    bottom: 50%;
    width: 3px;
    background: var(--primary-color);
    border-radius: 3px 0 0;
}

/* Blue accent — bottom half of left edge (overlaps border area) */
.skillsMoveOverlay .moveButton:hover:not(.disabled)::after {
    content: '';
    position: absolute;
    left: -3px;
    top: 50%;
    bottom: 0;
    width: 3px;
    background: #4a90d9;
    border-radius: 0 0 0 3px;
}

/* All inner text turns pure white on hover for max readability */
.skillsMoveOverlay .moveButton:hover:not(.disabled) .moveName,
.skillsMoveOverlay .moveButton:hover:not(.disabled) .moveMp,
.skillsMoveOverlay .moveButton:hover:not(.disabled) .moveDamage,
.skillsMoveOverlay .moveButton:hover:not(.disabled) .moveAccuracy,
.skillsMoveOverlay .moveButton:hover:not(.disabled) .moveEffect {
    color: #fff;
}

/* Effect description background also cleans up on hover */
.skillsMoveOverlay .moveButton:hover:not(.disabled) .moveEffect {
    background-color: rgb(255 255 255 / 8%);
    border-color: rgb(255 255 255 / 20%);
}

.skillsMoveOverlay .moveButton.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: #555;
}

/* ── FIGHT MOVE OVERLAY ──────────────────────────────────── */
.fightMoveOverlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgb(0 0 0 / 80%);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.fightMoveOverlay.active {
    display: flex;
}

.fightMoveContainer {
    background-color: var(--bg-color);
    border: 2px solid var(--primary-color);
    border-radius: 10px;
    padding: 20px;
    max-width: 400px;
    width: 90%;
    max-height: 80%;
    overflow-y: auto;
}

.fightMoveHeader {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--primary-color);
    padding-bottom: 10px;
}

.fightMoveHeader h3 {
    margin: 0;
    color: var(--primary-color);
}

.overlayEnemyElement {
    font-size: 0.8rem;
    font-weight: bold;
    padding: 4px 10px;
    border-radius: 6px;
    background: rgb(0 0 0 / 40%);
    border: 1px solid rgb(255 255 255 / 10%);
    white-space: nowrap;
}

.closeOverlayBtn {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.closeOverlayBtn:hover {
    color: var(--primary-color);
}

.fightMoveOverlay .fightMovesList {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.fightMoveOverlay .moveButton {
    background-color: var(--secondary-color);
    color: var(--text-color);
    border: none;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
    text-align: left;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    position: relative;
}

.fightMoveOverlay .moveButton:hover:not(.disabled) {
    background-color: var(--primary-color);
    transform: scale(1.02);
    box-shadow: 0 4px 8px rgb(0 0 0 / 30%);
}

.fightMoveOverlay .moveButton.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: #555;
}

/* ── Super-Effective Move Highlight ─────────────────────── */
.super-effective-highlight {
    border: 2px solid #ff00ff !important;
    box-shadow:
        0 0 12px rgb(255 0 255 / 40%),
        inset 0 0 8px rgb(255 0 255 / 10%);
}

.super-effective-highlight:hover:not(.disabled) {
    box-shadow:
        0 0 20px rgb(255 0 255 / 60%),
        inset 0 0 12px rgb(255 0 255 / 15%);
    border-color: #ff44ff !important;
}

.se-badge {
    font-size: 0.7em;
    color: #ff00ff;
    font-weight: bold;
    background: rgb(255 0 255 / 15%);
    padding: 1px 5px;
    border-radius: 4px;
    margin-left: 4px;
    text-shadow: 0 0 6px rgb(255 0 255 / 50%);
}

/* ── Status Effect Badges ───────────────────────────────── */
.statusEffects {
    display: flex;
    gap: 3px;
    flex-wrap: wrap;
    margin-top: 2px;
}

.statusBadge {
    font-size: 0.65rem;
    padding: 1px 4px;
    border-radius: 3px;
    font-weight: bold;
    white-space: nowrap;
}

.statusBadge.paralyzed {
    background: rgb(241 196 15 / 25%);
    color: #f1c40f;
    border: 1px solid rgb(241 196 15 / 40%);
}

.statusBadge.infatuated {
    background: rgb(255 105 180 / 25%);
    color: #ff69b4;
    border: 1px solid rgb(255 105 180 / 40%);
}

.statusBadge.poison {
    background: rgb(142 68 173 / 25%);
    color: #a29bfe;
    border: 1px solid rgb(142 68 173 / 40%);
}

.statusBadge.defense-lowered {
    background: rgb(52 152 219 / 25%);
    color: #3498db;
    border: 1px solid rgb(52 152 219 / 40%);
}

/* Move content structure */
.moveContent {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
}

.moveHeader {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.moveName {
    font-size: 1.1em;
    font-weight: bold;
    color: #fff;
}

.moveType {
    font-size: 0.8em;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: normal;
}

.moveType.physical {
    background-color: #ff6b6b;
    color: white;
}

.moveType.special {
    background-color: #4ecdc4;
    color: white;
}

.moveStats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85em;
    opacity: 0.9;
}

.moveMp {
    color: #87ceeb;
    font-weight: bold;
}

.moveDamage {
    color: #ffd700;
    font-weight: bold;
}

.moveAccuracy {
    color: #98fb98;
}

.moveEffect {
    margin-top: 4px;
    font-size: 0.8em;
    color: #ffa500;
    font-style: italic;
    text-align: center;
    padding: 2px 4px;
    background-color: rgb(255 165 0 / 10%);
    border-radius: 3px;
    border: 1px solid rgb(255 165 0 / 30%);
}

/* Responsive adjustments for smaller screens */
@media (width <= 768px) {
    .fightMoveOverlay .fightMovesList {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .fightMoveOverlay .moveButton {
        min-height: 80px;
        padding: 10px;
    }

    .moveStats {
        flex-wrap: wrap;
        gap: 4px;
    }

    .moveStats span {
        flex: 1;
        text-align: center;
    }
}
