/* body.css */

.contenedor-general {
  background: 
    linear-gradient(135deg, #F0F2F5 0%, #E6EAEA 100%),
    url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="4" height="4" viewBox="0 0 4 4"><rect width="4" height="4" fill="%23F0F2F5"/><path d="M0 0h4v4H0z" fill="%23E6EAEA" opacity="0.1"/></svg>') 
    0 0 / 20px 20px repeat;
  padding: 10px;
  min-height: calc(100vh - 100px);
  transition: background 0.3s ease;
}

/* ===== ESTILOS CONFLICTIVOS (COMENTADOS - CAUSABAN COLOR NARANJA) ===== */
/*
.aviso-premium {
    background: linear-gradient(135deg, #FFD700 0%, #FF8C00 100%);
    border: 1px solid #FF8C00;
}

.aviso-destacado {
    background: linear-gradient(135deg, #4FC3F7 0%, #0288D1 100%);
    border: 1px solid #0288D1;
}

.aviso-clasificado {
    background: white;
    border: 1px solid #E6E6E6;
}
*/
/* ===== FIN DE ESTILOS CONFLICTIVOS ===== */

/* MODO OSCURO */
@media (prefers-color-scheme: dark) {
  .contenedor-general {
    background: 
      #111b21,
      url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="4" height="4" viewBox="0 0 4 4"><rect width="4" height="4" fill="%23111b21"/><path d="M0 0h4v4H0z" fill="%230b141a" opacity="0.2"/></svg>') 
      0 0 / 20px 20px repeat;
  }
}

/* RESPONSIVE para móviles */
@media (max-width: 768px) {
  .contenedor-general {
    padding: 10px;
  }
}

/* ===== PAGINACIÓN RESPONSIVE ===== */
.paginacion {
    text-align: center;
    margin: 15px 0;
    padding: 10px;
}

.paginacion.compacto {
    margin: 12px 0;
    padding: 8px;
}

/* FIX PARA PAGINADOR EN DESKTOP */
@media (min-width: 769px) {
    .paginacion.compacto {
        display: flex !important;
        justify-content: center;
        gap: 20px;
        margin: 30px 0;
    }
    
    .boton-paginacion {
        padding: 12px 25px;
        font-size: 16px;
        border-radius: 20px;
        min-width: 120px;
    }
}

.boton-paginacion {
    background-color: #25D366;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 16px;
    font-weight: 600;
    text-decoration: none;
    margin: 0 5px;
    transition: all 0.2s ease;
    display: inline-block;
    font-size: 13px;
}

.boton-paginacion:hover {
    background-color: #128C7E;
    transform: translateY(-1px);
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

/* El resto de tu CSS permanece igual */
/* CONTENEDOR FLEXIBLE PARA FOTO + MENSAJE */
.contenedor-mensaje-whatsapp {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 10px 0;
  width: 100%;
  position: relative;
}

/* MENSAJE ENTRANTE - ANCHO COMPLETO */
.mensaje-entrante {
  position: relative;
  width: 100%;
  background-color: white;
  border-radius: 0 14px 14px 14px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
  overflow: visible;
  min-height: 70px;
  padding: 12px 16px;
  padding-bottom: 24px;
  box-sizing: border-box;
}

/* Texto del mensaje - Ancho completo */
.texto-mensaje {
  color: #111b21;
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-size: 15px;
  line-height: 1.45;
  word-wrap: break-word;
  margin-bottom: 8px;
  margin-top: 5px;
  width: 100%;
  box-sizing: border-box;
}

/* USERNAME - Ajustado para el nuevo ancho */
.username-izquierda {
    position: absolute;
    left: 130px;
    top: 5px;
    font-size: 13px;
    color: #909090;
    font-weight: 600;
    line-height: 1;
    z-index: 3;
    white-space: nowrap;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    pointer-events: none;
    user-select: none;
}

/* FOTO DE PERFIL CIRCULAR */
.foto-perfil-mensaje {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    border: 2px solid #25D366;
    object-fit: cover;
    flex-shrink: 0;
    background: linear-gradient(135deg, #128C7E 0%, #075E54 100%);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* TICKET - Posicionado en esquina inferior derecha */
.ticket-hora {
    position: absolute;
    bottom: 8px;
    right: 12px;
    color: #8696a0;
    font-size: 11px;
    line-height: 1;
    background: white;
    padding: 0 2px;
    z-index: 2;
    white-space: nowrap;
    font-weight: 500;
    transition: color 0.3s ease;
}

/* Estado: visto (cambia a ✓ en verde) */
.ticket-hora.visto {
    color: #25D366 !important;
    font-weight: bold;
}

.ticket-hora.visto::after {
    content: " ✓";
    font-family: 'Segoe UI', Arial, sans-serif;
}

/* PUNTA TRIANGULAR */
.mensaje-entrante::before {
    content: '';
    position: absolute;
    left: -7px;
    top: -9px;
    width: 16px;
    height: 18px;
    background-color: #fff;
    z-index: 2;
    pointer-events: none;
    clip-path: polygon(0 0, 100% 50%, 0 100%);
    transform: rotate(-30deg);
    transform-origin: 100% 50%;
    filter: drop-shadow(10px 10px 20px rgba(0, 0, 0, 0.92));
}

/* ==========================================================================
   SISTEMA DE COLUMNAS FIJAS - CONTENEDOR DE AVISOS
   ========================================================================== */
/*
/* Contenedor de avisos con DIVs - Sistema de columnas */
.contenedor-avisos {
    display: grid;
    gap: 6px;
}

.contenedor-avisos.compacto {
    gap: 5px;
}

/* Columnas fijas */
.contenedor-avisos.col-1 {
    grid-template-columns: 1fr;
}

.contenedor-avisos.col-2 {
    grid-template-columns: 1fr 1fr;
}

.contenedor-avisos.col-3 {
    grid-template-columns: 1fr 1fr 1fr;
}
*/

/* ==========================================================================
   AVISOS INDIVIDUALES
   ========================================================================== */
/*
.aviso-item {
    display: flex;
    align-items: stretch;
    padding: 10px;
    border-radius: 8px;
    margin: 2px 0;
    transition: all 0.2s ease;
    gap: 10px;
    min-height: 110px;
}

/* Borde especial para destacados */
.aviso-destacado .contenedor-imagen {
    border: 2px solid #0288D1;
    box-shadow: 0 0 0 1px #4FC3F7;
}

/* Borde especial para premium */
.aviso-premium .contenedor-imagen {
    border: 2px solid #FF8C00;
    box-shadow: 0 0 0 1px #FFD700;
}

/* Imagen dentro del círculo */
.contenedor-imagen img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    min-width: 100%;
    min-height: 100%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    object-position: center center;
}

/* Si no hay imagen, mostrar fondo */
.contenedor-imagen:not(:has(img[src])) {
    background: linear-gradient(135deg, #128C7E 0%, #075E54 100%);
}
*/

/* ==========================================================================
   TEXTO SUPERIOR E INFERIOR (en la imagen)
   ========================================================================== */
/*
.texto-superior {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    font-weight: 600;
    font-size: 12px;
    text-align: center;
    padding: 3px 0;
    line-height: 1.1;
    z-index: 2;
    border-top-left-radius: 50px;
    border-top-right-radius: 50px;
}

.texto-inferior {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.6);
    color: #25D366;
    font-weight: 500;
    font-size: 12px;
    text-align: center;
    padding: 3px 0;
    line-height: 1.1;
    z-index: 2;
    border-bottom-left-radius: 50px;
    border-bottom-right-radius: 50px;
}
*/

/* ==========================================================================
   INFORMACIÓN DEL AVISO
   ========================================================================== */
/*
.aviso-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 110px;
}

.aviso-detalle {
    color: #667781;
    font-size: 13px;
    line-height: 1.3;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    text-align: left;
    flex: 1;
    padding: 5px 0;
    min-height: 40px;
}

.calugas-container {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: flex-end;
    padding-top: 5px;
}

.caluga-adicional {
    background-color: #F5F5F5;
    color: #616161;
    font-weight: 400;
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 10px;
    display: inline-block;
    border: 1px solid #E0E0E0;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Calugas en avisos destacados */
.aviso-destacado .caluga-adicional {
    background-color: #E3F2FD;
    color: #0D47A1;
    border: 1px solid #64B5F6;
}

/* Calugas en avisos premium */
.aviso-premium .caluga-adicional {
    background-color: #FFF8E1;
    color: #E65100;
    border: 1px solid #FFD54F;
}
*/

/* ==========================================================================
   SECCIÓN DE REGIONES
   ========================================================================== */
/*
.contenedor-regiones {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 15px;
}

.region-item {
    text-align: center;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.region-item:hover {
    transform: scale(1.05);
}

.contenedor-imagen-region {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid #25D366;
    position: relative;
    background: linear-gradient(135deg, #128C7E 0%, #075E54 100%);
}

.contenedor-imagen-region img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    min-width: 100%;
    min-height: 100%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    object-position: center center;
}

.contenedor-imagen-region:not(:has(img[src])) {
    background: linear-gradient(135deg, #128C7E 0%, #075E54 100%);
}
*/

/* ==========================================================================
   RESPONSIVE GENERAL
   ========================================================================== */
/*
@media (max-width: 768px) {
    .contenido-interno {
        padding: 10px;
    }
    
    .contenido-interno.compacto {
        padding: 8px;
    }
    
    .aviso-item {
        padding: 8px;
        gap: 8px;
        min-height: 100px;
    }
    
    .contenedor-imagen {
        width: 100px;
        height: 100px;
        min-width: 100px;
    }
    
    .aviso-info {
        height: 100px;
    }
    
    .texto-superior,
    .texto-inferior {
        font-size: 11px;
        padding: 2px 0;
    }
    
    .caluga-adicional {
        font-size: 10px;
        padding: 3px 6px;
    }
    
    .aviso-detalle {
        font-size: 12px;
    }
    
    .contenedor-regiones {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 12px;
    }
    
    .contenedor-imagen-region {
        width: 100px;
        height: 100px;
    }
}

@media (max-width: 480px) {
    .aviso-item {
        padding: 6px;
        gap: 6px;
        min-height: 90px;
    }
    
    .contenedor-imagen {
        width: 90px;
        height: 90px;
        min-width: 90px;
    }
    
    .aviso-info {
        height: 90px;
    }
    
    .texto-superior,
    .texto-inferior {
        font-size: 10px;
        padding: 2px 0;
    }
    
    .caluga-adicional {
        font-size: 9px;
        padding: 2px 5px;
    }
    
    .aviso-detalle {
        font-size: 11px;
        padding: 3px 0;
    }
    
    .boton-paginacion {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .contenedor-avisos.col-2,
    .contenedor-avisos.col-3 {
        gap: 3px;
    }
    
    .contenedor-avisos.col-2 .aviso-item,
    .contenedor-avisos.col-3 .aviso-item {
        padding: 5px;
        gap: 5px;
        min-height: 80px;
    }
    
    .contenedor-avisos.col-2 .contenedor-imagen,
    .contenedor-avisos.col-3 .contenedor-imagen {
        width: 80px;
        height: 80px;
        min-width: 80px;
    }
    
    .contenedor-avisos.col-2 .aviso-info,
    .contenedor-avisos.col-3 .aviso-info {
        height: 80px;
    }
    
    .contenedor-avisos.col-2 .caluga-adicional,
    .contenedor-avisos.col-3 .caluga-adicional {
        font-size: 8px;
        padding: 2px 4px;
    }
    
    .contenedor-avisos.col-2 .aviso-detalle,
    .contenedor-avisos.col-3 .aviso-detalle {
        font-size: 10px;
    }
    
    .contenedor-regiones {
        grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
        gap: 10px;
    }
    
    .contenedor-imagen-region {
        width: 90px;
        height: 90px;
    }
}

/* Pantallas muy estrechas */
@media (max-width: 360px) {
    .aviso-detalle {
        -webkit-line-clamp: 2;
        overflow: hidden;
        text-overflow: ellipsis;
        display: -webkit-box;
        -webkit-box-orient: vertical;
    }
    
    .calugas-container {
        flex-wrap: wrap;
        justify-content: flex-start;
    }
}
*/