/* Estilos para el plugin SEO Analizador */


.spinner {
  display: inline-block;
  width: 24px;
  height: 24px;
  margin-left: 10px;
  border: 4px solid #ccc;
  border-top-color: #333;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  100% {
    transform: rotate(360deg);
  }
}


.seo-analizador-form {
    font-family: Arial, sans-serif;
    margin: 20px;
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    color: #222222; /* Cambiar color predeterminado a #222222 */
}
.seo-analizador-form h2 {
    text-align: center;

}
.seo-analizador-form h3 {
    text-align: center;
    margin-top: 20px;
    font-size: 24px;
    color: #333;
}
.seo-analizador-form input[type="text"] {
    width: calc(100% - 22px);
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 4px;
    border: 1px solid #ddd;
    font-size: 16px;
}
.seo-analizador-form input[type="submit"] {
    background-color: #28a745;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}
.seo-analizador-form input[type="submit"]:hover {
    background-color: #218838;
}
.seo-analizador-form .error {
    color: red;
    text-align: center;
    font-weight: bold;
}
.seo-analizador-form table {
    width: 100%;
    margin-top: 20px;
    border-collapse: collapse;
}

.seo-analizador-form table, th, td {
    border: 1px solid #ddd;
}

.seo-analizador-form th, td {
    padding: 8px;
    text-align: left;
}

.seo-analizador-form th {
    background-color: #f8f8f8;
}

/* Ajustar el ancho de las columnas de la tabla */
.seo-analizador-form table th:nth-child(1),
.seo-analizador-form table td:nth-child(1) {
    width: 20%; /* Ancho de la primera columna */
    font-weight: 600; /* Establece el peso de la fuente a 600 */
}


/* Texto en la primera columna de las celdas de datos, pero específicamente para los números en negrita */
.seo-analizador-form table td:nth-child(1) .seo-count {
    color: #006DCA !important; /* Mantener el color verde, o el que tenías antes, solo en .seo-count */
    font-weight: 600; /* Asegura el estilo en negrita si así lo deseas */
}

.seo-analizador-form table th:nth-child(2),
.seo-analizador-form table td:nth-child(2) {
    width: 80%; /* Ancho de la segunda columna */
}



.seo-modal {
    display: none; /* Ocultar por defecto */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
}
.seo-modal-content {
    background-color: white;
    margin: 10% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 70%;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    line-height: 1.7;
}
.seo-modal-close {
    color: red;
    float: right;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}
.seo-modal-close:hover {
    color: darkred;
}
.ver-todos {
    color: #0066ff;
  text-decoration: underline;
  font-weight: bold;
}

/* Estilos para hacer la tabla responsive */
.tabla-responsive {
    width: 100%;
    overflow-x: auto;
}

.tabla-responsive table {
    width: 100%;
    border-collapse: collapse;
}

.tabla-responsive th, .tabla-responsive td {
    word-wrap: break-word;
    padding-top: 24px;
    padding-right: 10px;
    padding-bottom: 24px;
    padding-left: 15px;
    
    
    text-align: left;
}

/* Estilos adicionales para las tablas en las ventanas modales */

.seo-modal-content .tabla-responsive table {
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}


/* Invertir el ancho de las columnas en las tablas dentro de las modales */
.seo-modal-content .tabla-responsive table th:nth-child(1),
.seo-modal-content .tabla-responsive table td:nth-child(1) {
    width: 20%; /* Ancho de la primera columna (URL) en modales */
}

.seo-modal-content .tabla-responsive table th:nth-child(2),
.seo-modal-content .tabla-responsive table td:nth-child(2) {
    width: 50%; /* Ancho de la segunda columna (Texto Ancla) en modales */
}

/* Alinear verticalmente el contenido de la columna "Aspecto SEO" al centro */
.tabla-responsive table th:first-child,
.tabla-responsive table td:first-child {
    vertical-align: middle;
    font-size: 17px;
    
}

/* Estilos para la Vista previa en la SERP */
.serp-preview {
    border: 1px solid #e0e0e0;
    padding: 15px;
    border-radius: 4px;
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    max-width: 600px;
    font-family: Arial, sans-serif;
    text-align: left; /* Alinear todo a la izquierda */
}

/* Primera fila: Favicon y URL */
.serp-top {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.serp-favicon {
    background-color: #f1f3f4;
    border: 1px solid #dadce0;
    border-radius: 50%;
    height: 26px;
    width: 26px;
    margin-right: 12px;
    flex-shrink: 0; /* Evita que el favicon se reduzca */
}

.serp-url {
    color: #4d5156;
    font-size: 12px;
    word-wrap: break-word; /* Para manejar URLs largas */
}

/* Segunda fila: Título */
.serp-title-container {
    margin-bottom: 8px;
}

.serp-title {
    color: #1a0dab;
    font-size: 20px;
    text-decoration: none;
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

/* Subrayado al pasar el cursor sobre el Título */
.serp-title:hover {
    text-decoration: underline;
}

/* Tercera fila: Descripción */
.serp-description {
    color: #474747;
    font-size: 14px;
    margin-top: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* Limitar a 2 líneas */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lh-exp-gauge-component {
  --stroke-width: 4px;
  --radius: 32px;
  --color-highlight: #0CCE6B;
  color: var(--color-highlight);
}

.lh-exp-gauge {
  margin: 0 auto;
  margin-right: 4px;
  width: 120px;
  height: 120px;
  stroke-width: var(--stroke-width);
  stroke-linecap: round;
  contain: strict;
  will-change: transform;
}

.lh-exp-gauge__base {
  fill: none;
}

.lh-exp-gauge--faded {
  opacity: 0.1;
}

.lh-exp-gauge-component circle {
  stroke: currentColor;
  r: var(--radius);
}

.lh-exp-gauge__text {
  fill: currentColor;
  font-size: 24px;
}


.seo-analizador-link {
  color: #0066ff;
  text-decoration: underline;
  font-weight: bold;
}

/* Estilos para el enlace que envuelve solo la imagen de Open Graph */
.og-image-link {
    display: block; /* Permite que el enlace abarque la imagen completa */
    text-decoration: none; /* Eliminar subrayado del enlace */
    color: inherit; /* Heredar el color del texto */
}

/* Estilos para la tarjeta de vista previa de Open Graph */
.og-card {
    border: 1px solid #d1d5db; /* border-gray-300 */
    border-radius: 12px; /* rounded-xl */
    overflow: hidden; /* overflow-hidden */
    background-color: rgb(214, 241, 200); /* background-color */
    max-width: 355px; /* Ancho máximo de la tarjeta */
    width: 100%; /* Permite que la tarjeta ocupe todo el ancho disponible dentro del contenedor */
    margin: 10px 0; /* Espaciado vertical */
    box-sizing: border-box;
}


/* Estilos para la imagen de Open Graph */
.og-image {
    width: 100%; /* Ocupa todo el ancho de la tarjeta */
    height: auto; /* Mantiene la proporción de la imagen */
    object-fit: cover; /* Cubre el contenedor sin distorsionar */
    display: block;
}

/* Contenido de Open Graph */
.og-content {
    padding: 16px; /* px-4 py-4 */
}

/* Título de Open Graph */
.og-title {
    font-weight: 500; /* font-medium */
    font-size: 16px; /* text-sm ajustado a 16px para mejor legibilidad */
    white-space: normal; /* Permite que el texto se ajuste a múltiples líneas */
    overflow: visible; /* No ocultar el contenido */
    text-overflow: unset; /* Eliminar el comportamiento de truncamiento */
    margin-bottom: 8px;
    line-height: 1.4; /* Mejorar la legibilidad */
}

/* Descripción de Open Graph */
.og-description {
    color: #4d5156; /* text-gray-600 */
    font-size: 14px; /* text-sm */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis; /* truncate */
    margin-bottom: 8px;
}

/* URL de Open Graph */
.og-url {
    color: #a1a1aa; /* text-gray-400 */
    font-weight: 300; /* font-light */
    font-size: 14px; /* text-sm */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis; /* truncate */
}

/* Margen inferior de 40px en todos los h2 dentro de las ventanas modales */
.seo-modal .seo-modal-content h2 {
    margin-bottom: 50px !important;
}

/* ===== Tooltips ===== */
.seo-tooltip {
    display: inline-block;
    position: relative;

    /* “?” en azul y negritas */
    color: #6d6c70;
    font-weight: bold;
    font-size: 12px;
    margin-left: 6px;
    cursor: help;
}

/* El recuadro del tooltip */
.seo-tooltip::after {
    content: attr(data-tooltip);
    display: none;
    position: absolute;
    
    /* Estilos de la ventana flotante */
    width: 230px;
    background-color: #fff;
    color: #222;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    
    font-size: 15px;
    font-weight: normal;   /* El texto del tooltip en peso normal */

    white-space: normal;
    word-wrap: break-word;    

    top: 50%;
    left: 110%;   /* Ajusta a tu gusto */
    transform: translateY(-50%);
    z-index: 9999;
}

/* Mostrar la ventana al hover */
.seo-tooltip:hover::after {
    display: block;
}

.seo-tooltip:hover::before {
    display: block;
}


/* Responsividad para la tarjeta de Open Graph */
@media screen and (max-width: 600px) {
    .og-card {
        max-width: 100%; /* Ocupa todo el ancho disponible en pantallas pequeñas */
    }

    .og-content {
        padding: 12px; /* Ajustar padding en móviles */
    }

    .og-title, .og-description, .og-url {
        font-size: 14px; /* Ajustar tamaño de fuente si es necesario */
    }
}





/* Responsividad para la Vista previa en la SERP */
@media screen and (max-width: 600px) {
    .serp-preview {
        max-width: 100%;
        padding: 10px;
    }

    .serp-favicon {
        height: 20px;
        width: 20px;
        margin-right: 8px;
    }

    .serp-title {
        font-size: 16px;
        white-space: normal; /* Permite que el título ocupe múltiples líneas */
    }

    .serp-description {
        font-size: 12px;
        -webkit-line-clamp: 3; /* Aumentar el límite de líneas para descripción */
    }
}





@media screen and (max-width: 600px) {
    .seo-analizador-form table, 
    .seo-analizador-form thead, 
    .seo-analizador-form tbody, 
    .seo-analizador-form th, 
    .seo-analizador-form td, 
    .seo-analizador-form tr { 
        display: block; 
    }
    
    .seo-analizador-form thead tr { 
        display: none; 
    }
    
    .seo-analizador-form td { 
        position: relative; 
        text-align: left;
    }
    
    .seo-analizador-form td:before { 
        position: absolute;
        top: 6px;
        left: 6px;
        width: 45%; 
        padding-right: 10px; 
        white-space: nowrap;
        font-weight: bold;
    }
    
    .thumbnail-image {
    width: 50px;
    height: 50px;
}

       /* Asegurar que ambas columnas ocupen el 100% del ancho en móviles */
    .seo-analizador-form table th:nth-child(1),
    .seo-analizador-form table td:nth-child(1),
    .seo-analizador-form table th:nth-child(2),
    .seo-analizador-form table td:nth-child(2) {
        width: 100%;
    }
    
        .seo-analizador-form table tr {
        margin-bottom: 35px;
    }

.seo-analizador-form {
    margin: 0px;
    padding: 10px;
    box-shadow: 0 0px 0px rgba(0, 0, 0, 0.0);
}

.seo-analizador-form table, th, td {
    border: 0px solid #ddd;
}

table td, table th {
    
    border-top: 1px solid #dcd8d8;
    border-right: 1px solid #dcd8d8;
    border-left: 1px solid #dcd8d8;
    border-bottom: 1px solid #dcd8d8;
}

.seo-modal-content {
    width: 93%;
    padding: 12px;
}

.seo-modal-content .tabla-responsive table th:nth-child(1), .seo-modal-content .tabla-responsive table td:nth-child(1) {
    width: 100%;
}

.seo-modal-content .tabla-responsive table th:nth-child(2), .seo-modal-content .tabla-responsive table td:nth-child(2) {
    width: 100%;
}
/* Ajustes para la tabla de imágenes con la columna "Texto alt" */
#modal-imagenes .tabla-responsive table th:nth-child(3),
#modal-imagenes .tabla-responsive table td:nth-child(3) {
    width: 40%; /* Ancho de la tercera columna */
}

/* Asegurar que en dispositivos móviles, las nuevas columnas también se adapten */
@media screen and (max-width: 600px) {
    #modal-imagenes .tabla-responsive table th:nth-child(3):before,
    #modal-imagenes .tabla-responsive table td:nth-child(3):before {
        position: absolute;
        left: 6px;
        font-weight: bold;
    }
    
    #modal-imagenes .tabla-responsive table th:nth-child(3),
    #modal-imagenes .tabla-responsive table td:nth-child(3) {
        width: 100%;
    }
}


/* Estilos para la tabla de Texto alt en la ventana modal */
#modal-texto-alt .tabla-responsive table th:nth-child(1),
#modal-texto-alt .tabla-responsive table td:nth-child(1) {
    width: 30%; /* Ancho de la columna de imágenes */
}

#modal-texto-alt .tabla-responsive table th:nth-child(2),
#modal-texto-alt .tabla-responsive table td:nth-child(2) {
    width: 70%; /* Ancho de la columna de texto alt */
}

/* Ajustes para dispositivos móviles */
@media screen and (max-width: 600px) {
    #modal-texto-alt .tabla-responsive table th:nth-child(1),
    #modal-texto-alt .tabla-responsive table td:nth-child(1),
    #modal-texto-alt .tabla-responsive table th:nth-child(2),
    #modal-texto-alt .tabla-responsive table td:nth-child(2) {
        width: 100%;
    }
}
