/* ARTSTENI WATCH - Sala abierta */

.watch-layout {
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(280px, 1fr);
    gap: 18px;
    text-align: left;
}

.watch-player {
    background: #120d1e;
    border: 1px solid #47305f;
    border-radius: 14px;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    display: flex;
    align-items: center;
    justify-content: center;
}

.watch-chat {
    background: #171121;
    border: 1px solid #47305f;
    border-radius: 14px;
    min-height: 400px;
    display: flex;
    flex-direction: column;
}

.watch-chat-header {
    padding: 18px;
    border-bottom: 1px solid #47305f;
    color: #d9baff;
    font-weight: bold;
}

.watch-chat-body {
    flex: 1;
    padding: 20px;
    color: #bdb1cd;
    font-size: 14px;
    line-height: 1.6;
}

.watch-chat-footer {
    padding: 15px;
    border-top: 1px solid #47305f;
}

.watch-kick-login {
    display: block;
    width: 100%;
    padding: 13px;
    border: 0;
    border-radius: 8px;
    background: #53fc18;
    color: #101010;
    font-weight: bold;
    text-align: center;
}

.watch-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 22px;
}

.watch-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 13px 22px;
    background: #291b3d;
    border: 1px solid #624284;
    border-radius: 10px;
    color: #eadbff;
    text-decoration: none;
    font-weight: bold;
}

/* Sala abierta a ancho completo */
main:has(#openRoom:not([hidden])) {
    display: block;
    min-height: 0;
    padding: 30px 3%;
}

main:has(#openRoom:not([hidden])) .panel {
    max-width: none;
    width: 100%;
}

#openRoom {
    width: 100%;
}

#openRoom .watch-layout {
    max-width: 1800px;
}

#openRoom .watch-player {
    min-width: 0;
    color: #bdb1cd;
}

@media (max-width: 800px) {
    .watch-layout {
        grid-template-columns: 1fr;
    }
}

/* Logotipos de plataformas */
.watch-brand-icon {
    width: 22px;
    height: 22px;
    object-fit: contain;
    flex-shrink: 0;
}

.watch-link:hover {
    background: #43285f;
    border-color: #b78aff;
}

/* Respetar siempre el estado de la sala */
#openRoom[hidden],
#closedRoom[hidden] {
    display: none !important;
}

/* Ajustar espacio inferior */
#openRoom .watch-links {
    margin-top: 22px;
    margin-bottom: 12px;
}

/* Chat integrado de Kick */
.watch-chat-body {
    padding: 0;
    min-height: 0;
    overflow: hidden;
}

.watch-chat-body iframe {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 500px;
    border: 0;
    background: #101010;
}


/* Controles laterales de ARTSTENI WATCH */
#openRoom .watch-side-controls {
    position: relative;
    height: 0;
    z-index: 5;
}

#openRoom .watch-side-toggle {
    position: absolute;
    top: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 13px;
    background: #291b3d;
    color: #eadbff;
    border: 1px solid #624284;
    border-radius: 10px;
    cursor: pointer;
    font: inherit;
    font-size: 13px;
    transition: background .2s, opacity .2s;
}

#openRoom .watch-side-left {
    left: 12px;
}

#openRoom .watch-side-right {
    right: 12px;
}

#openRoom .watch-side-toggle:hover {
    background: #43285f;
    border-color: #b78aff;
}

#openRoom .watch-side-toggle[aria-pressed="false"] {
    opacity: .55;
}

#openRoom .watch-layout.watch-chat-hidden {
    grid-template-columns: minmax(0, 1fr);
}

#openRoom .watch-layout.watch-chat-hidden .watch-chat {
    display: none;
}

@media (max-width: 800px) {
    #openRoom .watch-side-toggle {
        top: 10px;
        padding: 8px 10px;
    }
}


/* ARTSTENI: interruptores inferiores v2 */

#openRoom .watch-side-controls {
    position: relative;
    height: 42px;
    width: 100%;
    margin-top: 12px;
    background: #14101c;
    border-top: 1px solid #342345;
    border-bottom: 1px solid #342345;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 14px;
    box-sizing: border-box;
}

#openRoom .watch-side-toggle {
    position: static;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #d9c7ed;
    font-size: 12px;
    opacity: 1;
}

#openRoom .watch-side-toggle:hover {
    background: transparent;
    color: #ffffff;
    border: 0;
}

#openRoom .watch-side-toggle::before {
    content: "";
    width: 30px;
    height: 16px;
    background: #8144cf;
    border-radius: 20px;
    display: inline-block;
    box-shadow: inset 0 0 0 1px #a47adb;
}

#openRoom .watch-side-toggle::after {
    content: "";
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ffffff;
    top: 15px;
    pointer-events: none;
}

#openRoom .watch-side-left::after {
    left: 30px;
}

#openRoom .watch-side-right::after {
    right: 18px;
}

#openRoom .watch-side-toggle[aria-pressed="false"] {
    opacity: 1;
}

#openRoom .watch-side-toggle[aria-pressed="false"]::before {
    background: #51465f;
    box-shadow: none;
}

#openRoom .watch-side-left[aria-pressed="false"]::after {
    left: 16px;
}

#openRoom .watch-side-right[aria-pressed="false"]::after {
    right: 32px;
}

#openRoom .watch-side-right {
    flex-direction: row-reverse;
}

#openRoom .watch-side-controls {
    order: 2;
}

#openRoom {
    display: flex;
    flex-direction: column;
}

#openRoom .watch-layout {
    order: 1;
}

#openRoom .watch-links {
    order: 3;
}



/* ARTSTENI: ajuste final de interruptores v3 */

/* Barra alineada con los cuadros de video y chat */
#openRoom .watch-side-controls {
    width: 100%;
    max-width: 1800px;
    height: 52px;
    margin: 10px auto 0;
    padding: 0;
}

/* Texto e iconos mas grandes */
#openRoom .watch-side-toggle {
    font-size: 14px;
    gap: 9px;
    font-weight: 500;
}

/* Interruptores mas grandes */
#openRoom .watch-side-toggle::before {
    width: 40px;
    height: 22px;
    flex-shrink: 0;
}

/* Circulo interior */
#openRoom .watch-side-toggle::after {
    width: 16px;
    height: 16px;
    top: 18px;
}

/* Alineacion izquierda */
#openRoom .watch-side-left::after {
    left: 21px;
}

#openRoom .watch-side-left[aria-pressed="false"]::after {
    left: 3px;
}

/* Alineacion derecha */
#openRoom .watch-side-right::after {
    right: 3px;
}

#openRoom .watch-side-right[aria-pressed="false"]::after {
    right: 21px;
}



/* ARTSTENI: ajustar altura de enlaces v4 */

/* Reducir espacio entre interruptores y enlaces */
#openRoom .watch-links {
    margin-top: 10px;
    margin-bottom: 24px;
}

/* Reducir ligeramente el espacio superior de la sala */
main:has(#openRoom:not([hidden])) {
    padding-top: 18px;
}

/* Mantener los botones accesibles en pantallas pequenas */
#openRoom {
    padding-bottom: 12px;
}

