/* 
 * AreaModal.css 
 * Specific styling for the plant area selection modal.
 */

/* Container for the map and areas */
.area-modal-map-container {
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #f8f9fa;
    border-radius: 8px;
    overflow: hidden;
}

.area-modal-plant-img {
    width: 83%; /* Match original sizing */
    height: auto;
    display: block;
    position: relative;
}

/* Zone Container - overlay for buttons */
.area-modal-zones-overlay {
    position: absolute;
    width: 83%; /* Must match image width */
    height: 100%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Base style for clickable areas */
.area-btn {
    position: absolute;
    z-index: 10;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s ease-in-out;
    background-color: rgba(254, 254, 6, 0.4); /* Default semi-transparent yellow */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: bold;
    color: #333;
    padding: 0;
    border-radius: 4px;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.2);
}

.area-btn.not-allowed {
    opacity: 0.3;
    pointer-events: none;
    filter: grayscale(1);
}

.area-btn:hover {
    background-color: rgba(255, 173, 0, 0.6);
    border-color: #fff;
    z-index: 11;
}

.area-btn.selected, .area-btn.highlight-yellow {
    background-color: rgba(255, 255, 0, 0.8) !important; /* Vivid Yellow */
    border-color: #000;
    color: #000;
    box-shadow: 0 0 15px rgba(255, 255, 0, 0.5);
}

/* Macchinari Style */
.machine-btn {
    background-color: rgba(25, 135, 84, 0.5); /* Semi-transparent Green */
    color: #fff;
    z-index: 12;
}

/* COORDINATES FROM ORIGINAL CSS */

/* Areas */
#area-A1 { width: 11.3%; height: 7.3%; right: 10.3%; top: 50%; }
#area-A1\&2 { width: 11.4%; height: 21%; right: 44.1%; top: 22.5%; }
#area-A3 { width: 6.8%; height: 14.2%; right: 60.3%; top: 43%; }
#area-A4 { width: 3.7%; height: 16.8%; right: 64%; top: 22.6%; }
#area-S0 { width: 46.8%; height: 7%; right: 9%; top: 14%; }
#area-S1 { width: 77.4%; height: 14.8%; right: 10%; top: 58.9%; }
#area-S2 { width: 72.8%; top: 80.7%; height: 15.4%; right: 9.2%; }
#area-S3 { width: 6.2%; top: 29.5%; height: 50%; right: 0.8%; writing-mode: vertical-lr; }
#area-S4 { width: 59.3%; height: 7.3%; right: 35.3%; top: 3%;}
#area-S5 { width: 5%; top: 4.2%; height: 67%; right: 94.6%; writing-mode: vertical-lr; }

/* Macchinari */
#area-M1 { right: 44.1%; top: 47.2%; width: 11.4%; height: 9%; }
#area-M2 { right: 33%; top: 15.8%; width: 14%; height: 6%; }
#area-M3 { right: 22.7%; top: 44.7%; width: 17%; height: 11%; }
#area-M4 { right: 55.6%; top: 22.7%; width: 8.2%; height: 16.7%; }
#area-M5 { right: 59.7%; top: 14%; width: 12.7%; height: 8.3%; }
#area-M6 { right: 10.5%; top: 25%; width: 11.2%; height: 24%; }
#area-M7 { right: 34.9%; top: 23%; width: 4.5%; height: 14%; }
#area-M8 { right: 67.3%; top: 43.1%; width: 4.9%; height: 14%; }
#area-M9 { right: 68%; top: 22.7%; width: 4.3%; height: 16.7%; }

/* Modal specific sizing to accommodate the map */
.modal-xl-custom {
    max-width: 90vw;
}

@media (min-width: 1200px) {
    .modal-xl-custom {
        max-width: 1300px;
    }
}

/* Container for buttons below map */
.area-modal-btn-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 1rem;
    justify-content: center;
}

.btn-green-outline {
    background-color: #fff;
    border: 2px solid #198754;
    color: #198754;
    font-weight: bold;
    min-width: 100px;
}

.btn-green-outline:hover, .btn-green-outline.active {
    background-color: #198754;
    color: #fff;
}

/* Step 2 & Subzone Styles */
.warehouse-detail-map-container {
    background-color: #f0f0f0;
    border-radius: 4px;
    margin-bottom: 1rem;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.05);
}

.warehouse-detail-map-container img {
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

#sottozone_buttons .row {
    margin-bottom: 1.5rem;
}

#sottozone_buttons label {
    margin-bottom: 0.5rem;
    display: block;
    color: #495057;
    font-size: 1.1rem;
    font-weight: 400 !important;
}

/* Custom Nice Select overrides for the requested look */
.nice-select.fs-5, #sottozone_buttons .nice-select {
    font-size: 1.15rem !important;
    height: 52px;
    line-height: 32px;
    width: 100% !important;
    border-radius: 6px !important;
    padding-left: 15px;
}

.nice-select.disabled {
    background-color: #f8f9fa !important;
    opacity: 0.8;
    color: #6c757d;
}

.area-modal-btn-list .btn-green-outline {
    margin-bottom: 10px;
}


@media (max-width: 768px) {
    .btn-green-outline {
        width: 90%;
    }
}

.col-selection-highlight {
    outline-color: yellow;
    outline-style: solid;
    outline-width: 4px;
    z-index: 110 !important;
    box-sizing: border-box;
    box-shadow: 0 0 10px rgba(255, 255, 0, 0.5);
}
