body{
    font-family: var(--main-font) !important;
    overflow: hidden;
}

main{
    height: 100vh !important;
    overflow: hidden !important;
}

.robot-wrapper{
    padding: 20px;
    width: 100%;
    height: 100vh;
    max-width: 100%;
    box-sizing: border-box;
    overflow-y: auto;
    overflow-x: hidden;
}

.robot-container-element{
    display: flex;
    flex-direction: column;
    gap: 0;
    width: 100%;
    max-width: 1080px;
    margin: 0 auto 30px auto;
    border: solid 1px var(--text-3, #ddd);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0px 2px 8px rgba(0,0,0,0.1);
    box-sizing: border-box;
    min-height: 500px;
}

#robots-container{
    display: flex;
    flex-direction: column;
    width: 100%;
    box-sizing: border-box;
}

/* HEADER DU ROBOT */
.robot-header-container{
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 15px;
    padding: 15px;
    background-color: var(--bg-1, #fafafa);
    border-bottom: 1px solid var(--text-3, #e0e0e0);
    box-sizing: border-box;
    min-height: 80px;
}

.robot-image-map{
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 1px solid #ccc;
    background-color: white;
    overflow: hidden;
    flex-shrink: 0;
}

.robot-image-map img{
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.robot-info-container{
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1;
    min-width: 0;
    max-width: calc(100% - 220px);
}

.robot-info{
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.robot-name{
    font-size: 16px;
    font-weight: 600;
    white-space: nowrap;
}

.robot-spot{
    font-size: 14px;
    color: var(--text-2, #666);
    white-space: nowrap;
}

.robot-reservation{
    font-size: 13px;
    color: var(--text-2, #777);
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.4;
    max-height: 2.8em;
}

.camera-selector-container{
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.camera-label{
    font-size: 14px;
    font-weight: 500;
    color: var(--text-1, #333);
    margin: 0;
}

.camera-dropdown{
    padding: 7px 12px;
    border: 1px solid var(--text-3, #ccc);
    border-radius: 5px;
    background-color: white;
    color: var(--text-1, #333);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
}

.camera-dropdown:hover{
    border-color: var(--text-2, #999);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.camera-dropdown:focus{
    border-color: var(--primary-color, #007bff);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.2);
}

/* CONTENU VIDEO + MAP */
.robot-wrapper-element{
    display: flex;
    flex-direction: row;
    width: 100%;
    min-height: 400px;
    flex: 1;
    box-sizing: border-box;
}

.stream-image-map{
    flex: 1;
    min-width: 0;
    min-height: 400px;
    position: relative;
    background-color: #1a1a1a;
}

.stream-image-map video{
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.stream-overlay{
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    z-index: 10;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.stream-overlay.hidden{
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.stream-play-button{
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: none;
    background: var(--vitta-green);
    color: white;
    font-size: 28px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 20px rgba(62, 169, 245, 0.4);
}

.stream-play-button i{
    margin-left: 4px;
}

.stream-play-button:hover{
    transform: scale(1.1);
    background: var(--vitta-green-dark);
    box-shadow: 0 6px 30px rgba(62, 169, 245, 0.6);
}

.stream-play-button:active{
    transform: scale(0.95);
}

.stream-overlay-text{
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    font-weight: 500;
}

.map-container{
    flex: 1;
    min-width: 0;
    min-height: 400px;
    display: flex !important;
    flex-direction: column;
}

.map-container > div{
    width: 100% !important;
    height: 100% !important;
    flex: 1;
}

@media screen and (max-width: 968px){
    .robot-header-container{
        align-items: flex-start;
    }

    .robot-info-container{
        max-width: calc(100% - 180px);
    }
}

@media screen and (max-width: 768px){
    .robot-wrapper{
        padding: 12px;
    }

    .robot-container-element{
        margin-bottom: 20px;
        min-height: 600px;
    }

    .robot-header-container{
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 12px;
        min-height: auto;
    }

    .robot-info-container{
        width: 100%;
        max-width: 100%;
    }

    .robot-info{
        flex-direction: row;
        justify-content: flex-start;
    }

    .robot-reservation{
        -webkit-line-clamp: 3;
        max-height: 4.2em;
    }

    .camera-selector-container{
        width: 100%;
        justify-content: space-between;
        padding: 10px;
        background-color: rgba(0,0,0,0.03);
        border-radius: 5px;
    }

    .robot-wrapper-element{
        flex-direction: column;
        min-height: 500px;
    }

    .stream-image-map{
        width: 100%;
        min-height: 250px;
        height: auto;
    }

    .map-container{
        width: 100%;
        min-height: 250px;
        height: auto;
    }

    .map-container > div{
        width: 100% !important;
        height: 100% !important;
        min-height: 250px;
    }
}

@media screen and (max-width: 480px){
    .robot-wrapper{
        padding: 10px;
    }

    .robot-container-element{
        margin-bottom: 15px;
        min-height: 500px;
    }

    .robot-header-container{
        padding: 10px;
        gap: 10px;
    }

    .robot-image-map{
        width: 45px;
        height: 45px;
    }

    .robot-name{
        font-size: 15px;
    }

    .robot-spot{
        font-size: 13px;
    }

    .robot-reservation{
        font-size: 12px;
    }

    .camera-label{
        font-size: 13px;
    }

    .camera-dropdown{
        font-size: 13px;
        padding: 6px 10px;
    }

    .robot-wrapper-element{
        min-height: 400px;
    }

    .stream-image-map{
        min-height: 200px;
    }

    .map-container{
        min-height: 200px;
    }

    .map-container > div{
        min-height: 200px;
    }
}