/**
 * Simple Overlay System - Just Show/Hide Image
 * No zoom, pan, drag - keep it simple
 */

/* Grid stage needs relative positioning */
.ms-grid-overlay-stage {
    position: relative;
}

/* Overlay image positioned behind grid */
.ms-grid-overlay-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: auto;
    object-fit: contain;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    pointer-events: none;
    z-index: 1;
}

/* When overlay is active, show the image */
.ms-grid-overlay-stage.overlay-active .ms-grid-overlay-image {
    opacity: 0.7 !important;
    visibility: visible !important;
}

/* Grid sits above overlay image */
.ms-simple-grid {
    position: relative;
    z-index: 2;
}

/* Simple toggle button styling */
.ms-overlay-toggle {
    background: #4a90e2 !important;
    color: white !important;
    border: 1px solid #357abd !important;
    padding: 10px 20px !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    font-weight: 600 !important;
    transition: all 0.2s ease !important;
}

.ms-overlay-toggle:hover {
    background: #357abd !important;
    transform: translateY(-1px);
}

.ms-overlay-toggle.active {
    background: #2c3e50 !important;
    border-color: #1a252f !important;
}

/* Grid cells get slight transparency in overlay mode */
.overlay-active .ms-grid-cell {
    background-color: rgba(255, 255, 255, 0.85) !important;
}

.overlay-active .ms-grid-cell.taken {
    background-color: rgba(74, 144, 226, 0.3) !important;
}

.overlay-active .ms-grid-cell.available {
    background-color: rgba(189, 195, 199, 0.25) !important;
}

/* Disable all touch zoom/pan on overlay - prevent trackpad pinch zoom */
.overlay-active {
    touch-action: pan-x pan-y !important;
    user-select: none;
}

.overlay-active * {
    touch-action: inherit !important;
}

/* Prevent any scale transforms from other CSS */
.overlay-active .ms-grid-overlay-stage,
.overlay-active .ms-simple-grid {
    transform: none !important;
}
