/**
 * Todos los estilos de CSS para el área pública.
 * Estos estilos emulan la apariencia de los estados de WhatsApp.
 *
 * @since      1.0.0
 */

/* Estilos del botón para abrir los estados */
.web-estados-button-container {
    margin: 15px 0;
}

.web-estados-open-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    border-radius: 20px;
    border: none;
    background-color: #25D366;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.web-estados-open-button:hover {
    background-color: #128C7E;
}

.web-estados-icon-status {
    display: inline-block;
    width: 16px;
    height: 16px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path fill="white" d="M12 2.25c5.385 0 9.75 4.365 9.75 9.75s-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12 6.615 2.25 12 2.25zm0 8.625a1.125 1.125 0 100 2.25 1.125 1.125 0 000-2.25zM16.5 12a1.125 1.125 0 112.25 0 1.125 1.125 0 01-2.25 0zm-9 0a1.125 1.125 0 112.25 0 1.125 1.125 0 01-2.25 0z"/></svg>');
    background-size: contain;
    background-repeat: no-repeat;
}

.web-estados-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #075E54;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
}

/* Estilos del visor de estados */
.web-estados-viewer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 999999;
    display: none;
}

.web-estados-container {
    position: relative;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    display: flex;
    flex-direction: column;
}

/* Encabezado con barras de progreso */
.web-estados-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 2;
}

.web-estados-progress-container {
    display: flex;
    flex-grow: 1;
    gap: 4px;
    margin-right: 15px;
}

.web-estados-progress-bar {
    height: 3px;
    background-color: rgba(255, 255, 255, 0.3);
    flex-grow: 1;
    position: relative;
    border-radius: 1.5px;
    overflow: hidden;
}

.web-estados-progress {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0;
    background-color: white;
    border-radius: 1.5px;
    transition: width 0.1s linear;
}

.web-estados-progress-bar.seen .web-estados-progress {
    width: 100%;
    background-color: white;
}

.web-estados-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.web-estados-pause-button,
.web-estados-close-button {
    background: none;
    border: none;
    padding: 5px;
    cursor: pointer;
    color: white;
}

.web-estados-icon-pause,
.web-estados-icon-play,
.web-estados-icon-close {
    display: inline-block;
    width: 20px;
    height: 20px;
    background-size: contain;
    background-repeat: no-repeat;
}

.web-estados-icon-pause {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path fill="white" d="M8 5v14l11-7z"/></svg>');
}

.web-estados-icon-play {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path fill="white" d="M6 19h4V5H6v14zm8-14v14h4V5h-4z"/></svg>');
}

.web-estados-icon-close {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path fill="white" d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/></svg>');
}

/* Contenido del estado */
.web-estados-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.web-estados-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
    z-index: 1;
}

.web-estados-media {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.web-estados-text {
    position: absolute;
    left: 0;
    right: 0;
    padding: 20px;
    color: white;
    text-align: center;
    z-index: 2;
}

.web-estados-text-top {
    top: 60px;
    bottom: auto;
}

.web-estados-text-middle {
    top: 50%;
    transform: translateY(-50%);
}

.web-estados-text-bottom {
    bottom: 20px;
    top: auto;
}

.web-estados-text-small {
    font-size: 14px;
}

.web-estados-text-medium {
    font-size: 18px;
}

.web-estados-text-large {
    font-size: 24px;
}

/* Controles de navegación */
.web-estados-navigation {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    z-index: 2;
    pointer-events: none;
}

.web-estados-prev,
.web-estados-next {
    flex: 1;
    pointer-events: auto;
    cursor: pointer;
}

/* Animaciones */
@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fade-out {
    from { opacity: 1; }
    to { opacity: 0; }
}

.web-estados-fade-in {
    animation: fade-in 0.3s forwards;
}

.web-estados-fade-out {
    animation: fade-out 0.3s forwards;
}

/* Responsivo */
@media (max-width: 768px) {
    .web-estados-text-small {
        font-size: 12px;
    }
    
    .web-estados-text-medium {
        font-size: 16px;
    }
    
    .web-estados-text-large {
        font-size: 20px;
    }
    
    .web-estados-header {
        padding: 10px;
    }
}