/* ========================================
 * Draw Hand Feature Styles
 * ========================================
 * 
 * Styles for the Draw Hand feature in the deck editor.
 * Extracted from index.css for modularity.
 * 
 * Created: Draw Hand refactoring Phase 1
 * ======================================== */

/* Draw Hand Section */
.draw-hand-section {
    background: rgba(0, 0, 0, 0.432) !important; /* Increased shading by 20% (was 0.36) */
    border: 1px solid rgba(78, 205, 196, 0.2); /* Reduced opacity to match deck content section shading */
    border-radius: 8px;
    margin: 20px;
    padding: 15px;
    position: relative;
    z-index: 1;
}

.draw-hand-header {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 15px;
}

.draw-hand-header-end {
    flex-shrink: 0;
}

.draw-hand-footer {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 12px;
    flex-shrink: 0;
}

.draw-hand-redraw-btn {
    background: rgba(78, 205, 196, 0.15);
    color: #4ecdc4;
    border: 1px solid rgba(78, 205, 196, 0.35);
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.draw-hand-redraw-btn:hover {
    background: rgba(78, 205, 196, 0.25);
    border-color: rgba(78, 205, 196, 0.55);
}

.draw-hand-redraw-btn:focus-visible {
    outline: 2px solid rgba(78, 205, 196, 0.6);
    outline-offset: 2px;
}

.draw-hand-close {
    background: none;
    border: none;
    color: #888;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.draw-hand-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.draw-hand-content {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.drawn-card {
    width: 132px;
    height: 185px;
    border-radius: 6px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border: 2px solid rgba(78, 205, 196, 0.3);
    transition: all 0.3s ease;
    cursor: grab;
    position: relative;
}

.drawn-card.event-card {
    width: 185px;
    height: 132px;
    position: relative;
    overflow: hidden;
}

/* Event face fills landscape slot on desktop (mobile uses rotation in deck-editor-mobile.css) */
.drawn-card.event-card .drawn-card-face {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.layout-desktop .drawn-card:hover,
html:not(.layout-mobile) .drawn-card:hover {
    transform: translateY(-12px) scale(1.984);
    z-index: 10;
    box-shadow: 0 12px 24px rgba(78, 205, 196, 0.4);
    border-color: rgba(78, 205, 196, 0.8);
}

@media (hover: hover) and (pointer: fine) {
    .layout-mobile #deckEditorModal:not(.draw-hand-active) .drawn-card:hover {
        transform: translateY(-12px) scale(1.984);
        z-index: 10;
        box-shadow: 0 12px 24px rgba(78, 205, 196, 0.4);
        border-color: rgba(78, 205, 196, 0.8);
    }
}

/* Desktop / non-mobile stack: hover fan (skip when mobile vertical fan is active) */
.layout-desktop .draw-hand-content:hover .drawn-card:not(:hover),
html:not(.layout-mobile) .draw-hand-content:hover .drawn-card:not(:hover) {
    transform: scale(0.85);
    opacity: 0.7;
}

@media (hover: hover) and (pointer: fine) {
    .layout-mobile #deckEditorModal:not(.draw-hand-active) .draw-hand-content:hover .drawn-card:not(:hover) {
        transform: scale(0.85);
        opacity: 0.7;
    }
}

.drawn-card:active {
    cursor: grabbing;
}

.drawn-card.dragging {
    opacity: 0.5;
    transform: rotate(5deg) scale(1.1);
    z-index: 1000;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.draw-hand-content.drag-over {
    background-color: rgba(78, 205, 196, 0.1);
    border: 2px dashed #4ecdc4;
}

/* Mobile vertical fan: column + wrap creates extra columns — nowrap enforced in deck-editor-mobile.css */
.layout-mobile #deckEditorModal.draw-hand-active .draw-hand-content {
    flex-wrap: nowrap !important;
    gap: 0;
}

/* Draw Training button styling - Blue button for Spartan Training Ground */
.draw-training-btn {
    background: rgba(72, 219, 251, 0.2);
    color: #48dbfb;
    border: 1px solid rgba(72, 219, 251, 0.3);
    border-radius: 3.3px;
    padding: 3.3px 6.6px;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    font-family: monospace;
    box-sizing: border-box;
    line-height: 1;
}

.draw-training-btn:hover {
    background: rgba(72, 219, 251, 0.3);
    border-color: rgba(72, 219, 251, 0.5);
}

/* Dimmed state when Pre-Placed is active (similar to KO and reserve buttons) */
.draw-training-btn.active {
    background: rgba(72, 219, 251, 0.15);
    border-color: rgba(72, 219, 251, 0.25);
    color: rgba(72, 219, 251, 0.6);
    opacity: 0.7;
}

.draw-training-btn.active:hover {
    background: rgba(72, 219, 251, 0.2);
    border-color: rgba(72, 219, 251, 0.3);
    color: rgba(72, 219, 251, 0.7);
}

