/* 
 * Standardized Premium Switch Design for Intrabey
 * Based on the design from intervention_detail
 */

.custom-switch-container {
    position: relative;
    display: flex;
    width: 100%;
    background-color: #eaecf4;
    border-radius: 50px;
    padding: 2px;
    cursor: pointer;
    user-select: none;
    height: 38px;
    border: none;
    overflow: hidden;
}

/* Hide original inputs */
.custom-switch-container input {
    display: none !important;
}

.custom-switch-container label {
    flex: 1;
    text-align: center;
    line-height: 34px;
    margin-bottom: 0;
    z-index: 2;
    cursor: pointer;
    color: #858796;
    font-weight: 600;
    transition: color 0.3s ease;
    font-size: 0.9rem;
}

/* Slide background */
.custom-switch-container .slide-bg {
    position: absolute;
    top: 2px;
    left: 2px;
    z-index: 1;
    border-radius: 50px;
    transition: transform 0.3s ease, background-color 0.3s ease;
    height: 34px;
}

/* 2 Items Layout */
.custom-switch-container.switch-2 .slide-bg {
    width: calc(50% - 2px);
}
.custom-switch-container.switch-2 input:nth-of-type(2):checked ~ .slide-bg {
    transform: translateX(100%);
}

/* 3 Items Layout */
.custom-switch-container.switch-3 .slide-bg {
    width: calc(33.333% - 2px);
}
.custom-switch-container.switch-3 input:nth-of-type(2):checked ~ .slide-bg {
    transform: translateX(100%);
}
.custom-switch-container.switch-3 input:nth-of-type(3):checked ~ .slide-bg {
    transform: translateX(200%);
}

/* Label color changes when checked */
.custom-switch-container input:checked + label {
    color: #fff !important;
}

/* Primary Theme (Blue/Red as in intervention_detail) */
.switch-primary .slide-bg { background-color: #4e73df; }
.switch-primary input[value="0"]:checked ~ .slide-bg,
.switch-primary input[id$="_non"]:checked ~ .slide-bg,
.switch-primary input[id$="_non_c"]:checked ~ .slide-bg { 
    background-color: #e74a3b !important; 
}

/* Status Theme (OK=Blue, NOK=Red, NA=Grey) */
.switch-status input:nth-of-type(1):checked ~ .slide-bg { background-color: #4e73df; } /* OK */
.switch-status input:nth-of-type(2):checked ~ .slide-bg { background-color: #e74a3b; } /* NOK */
.switch-status input:nth-of-type(3):checked ~ .slide-bg { background-color: #858796; } /* NA */

/* Yes/No Theme (Yes=Blue/Green, No=Red) - Default to blue/red for "premium" look */
.switch-yes-no .slide-bg { background-color: #4e73df; }
.switch-yes-no input:nth-of-type(2):checked ~ .slide-bg { background-color: #e74a3b; }

/* Inverse Yes/No Theme (No=Green, Yes=Red) */
.switch-no-yes input:nth-of-type(1):checked ~ .slide-bg { background-color: #e74a3b; }
.switch-no-yes input:nth-of-type(2):checked ~ .slide-bg { background-color: #1cc88a; }

/* Neutral/Grey Theme */
.switch-grey .slide-bg { background-color: #858796; }

/* --- Global UX Enhancements --- */

/* Sticky Footer Actions */


.sticky-footer-btn {
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
    font-weight: 700;
    letter-spacing: 0.05rem;
    padding: 0.75rem 2.5rem;
}

/* Photo Cards Layout */
.photo-card {
    position: relative;
    border-radius: 0.5rem;
    overflow: hidden;
    background: #fff;
    border: 1px solid #e3e6f0;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    height: 100%;
}
.photo-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 0.5rem 1rem rgba(58, 59, 69, 0.15) !important;
}
.photo-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    display: block;
}
.photo-controls {
    padding: 10px;
    background: rgba(255, 255, 255, 0.9);
    border-top: 1px solid #e3e6f0;
    display: flex;
    justify-content: center;
    align-items: center;
}
.photo-controls i {
    font-size: 1.1rem;
    cursor: pointer;
    transition: opacity 0.2s;
}
.photo-controls i:hover {
    opacity: 0.7;
}

/* Drag & Drop Zone */
#drop-zone.bg-light.border-primary {
    background-color: #eaecf4 !important;
    border-color: #4e73df !important;
    border-style: solid !important;
}
