/* === MODAL WINDOW === VENTANA MODAL === */
#little-message-lite-modal {
    position: fixed;
    top: 10%;
    left: 50%;
    transform: translateX(-50%); /* Center horizontally only - Solo centrar horizontalmente */
    z-index: 9999;
    background: #fff;
    padding: 2em;
    border-radius: 12px;
    width: 95%;
    max-width: 600px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    color: #333;
}

/* Overlay behind modal - Fondo oscuro detrás del modal */
#little-message-lite-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.5);
    z-index: 9998;
}
#little-message-lite-modal h2 {
    margin-top: 0;
    font-size: 1.6em;
    color: #0073aa;
    text-align: center;
    border-bottom: 1px solid #eee;
    padding-bottom: 0.5em;
}
#little-message-lite-modal p {
    margin: 1em 0;
    line-height: 1.6;
}
/* Message content box - Caja de contenido del mensaje */
#little-message-lite-modal-message {
    height: 200px;
    overflow-y: auto;
    padding: 6px;
    border: 1px solid #ccc;
    border-radius: 6px;
    background-color: #fafafa;
    white-space: pre-wrap; /* Preserve line breaks / Respetar saltos de línea */
}
/* Copy email button - Botón para copiar correo electrónico */
#little-message-lite-modal-copy-email.button {
    font-size: 0.9em;
    padding: 6px 10px;
    vertical-align: middle;
    transition: background 0.2s;
}
#little-message-lite-modal-copy-email.button:hover {
    background-color: #ccd0d4;
    color: #111;
}
/* Modal close button - Botón para cerrar el modal */
#little-message-lite-modal-close {
    position: absolute;
    top: -12px;
    right: -12px;
    background: #ff4d4d;
    color: white;
    border: none;
    border-radius: 50%;
    font-weight: bold;
    width: 28px;
    height: 28px;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    font-size: 18px;
    line-height: 16px;
    text-align: center;
}
/* Status select dropdown - Menú desplegable de estado */
#little-message-lite-status-select {
    padding: 6px;
    margin-top: 5px;
    border-radius: 4px;
    border: 1px solid #ccc;
}
/* Save status button - Botón para guardar estado */
#little-message-lite-save-status {       
    position: relative;
    padding: 10px 36px;
    transition: background-color 0.3s;
    background: #0073aa;
    border: none;
    color: white;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
}
#little-message-lite-save-status:hover {
    background: #005a87;
}
#little-message-lite-save-status .text {
    display: inline-block;
    vertical-align: middle;
}
/* Spinner for loading - Ícono giratorio de carga */
#little-message-lite-save-status .little-message-lite-spinner {
    display: none;
    position: absolute;
    left: 8px;
    top: 50%;
    width: 16px;
    height: 16px;
    margin-top: -8px;
    border: 2px solid white;
    border-top-color: transparent;
    border-radius: 50%;
    animation: little-message-lite-spin 1s linear infinite;
    pointer-events: none;
}
#little-message-lite-save-status.loading .little-message-lite-spinner {
    display: inline-block;
}
#little-message-lite-save-status.loading .text {
    opacity: 0.7;
}
/* Spin animation keyframes - Fotogramas clave para animación de giro */
@keyframes little-message-lite-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
/*///////////////////////////*/
/* Toast notification - Notificación emergente */
.little-message-lite-toast {
    position: fixed;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: #0073aa;
    color: white;
    padding: 10px 20px;
    border-radius: 6px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    z-index: 10000;
    font-size: 14px;
    animation: little-message-lite-fadeInUp 0.3s ease-out;
}
/* Fade in and up animation - Animación de entrada y elevación */
@keyframes little-message-lite-fadeInUp {
    from { opacity: 0; transform: translateX(-50%) translateY(10px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}
/* Save toast message - Mensaje emergente de guardado */
.little-message-lite-toast-save {
    color: #155724;
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    padding: 10px 15px;
    margin-top: 10px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
}
/* === ROW statuses - Estados de las filas === */
.little-message-lite-row.status-new {
  background-color: #fff8e1 !important; /* light yellow - Amarillo claro */
  font-weight: bold;
}
.little-message-lite-row.status-read {
  background-color: #e0f7fa !important; /* light blue - Azul claro */
  font-style: italic;
}
.little-message-lite-row.status-replied {
  background-color: #f7faff !important;
  color: #444 !important;
  font-style: italic;
}
/* Icons before first cell - Iconos antes de la primera celda */
.little-message-lite-row.status-new td:first-child::before {
  content: "🆕 ";
}
.little-message-lite-row.status-read td:first-child::before {
  content: "👀 ";
}
.little-message-lite-row.status-replied td:first-child::before {
  content: "✅ ";
}
/* Hover effect - Efecto al pasar el cursor */
.little-message-lite-row:hover {
  background-color: #dfe6e9 !important;
  cursor: pointer;
}
/* Controls container - Contenedor de controles */
.little-message-lite-controls {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 20px;
    justify-content: space-between; /* 🧠 This is the magic */
}
/* Control select group - Grupo de selección de controles */
.little-message-lite-control-select {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
/* Save status button margin - Margen del botón de guardar estado */
#little-message-lite-save-status {
    margin-top: 5px;
}
/* === Reply modal - Modal de respuesta === */
#little-message-lite-reply-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.5);
    z-index: 9998; /* just below modal, above everything else - Justo debajo del modal, encima del resto */
    display: none;
}
#little-message-lite-reply-modal {
    position: fixed;
    top: 12%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    background: #fff;
    padding: 2em;
    border-radius: 12px;
    width: 95%;
    max-width: 600px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    color: #333;
}
#little-message-lite-reply-modal h2 {
    margin-top: 0;
    font-size: 1.6em;
    color: #0073aa;
    text-align: center;
    border-bottom: 1px solid #eee;
    padding-bottom: 0.5em;
}
#little-message-lite-reply-modal label {
    font-weight: bold;
    display: block;
    margin-bottom: 5px;
    color: #444;
}
#little-message-lite-reply-modal input[type="text"],
#little-message-lite-reply-modal input[type="email"],
#little-message-lite-reply-modal textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    margin-bottom: 15px;
    font-size: 14px;
}
#little-message-lite-reply-modal textarea {
    resize: vertical;
    min-height: 100px;
}
#little-message-lite-reply-modal .button.button-primary {
    background-color: #0073aa;
    color: white;
    padding: 10px 35px;
    border-radius: 6px;
    border: none;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
}
/* Prevent button from turning white when disabled - Evita que el botón se ponga blanco al estar deshabilitado */
#little-message-lite-reply-modal .button.button-primary:disabled {
    background-color: #0073aa !important;
    color: #ffffff !important;
    opacity: 1 !important;
    filter: none !important;
    cursor: not-allowed !important;
}
/* Hover effect for primary button - Efecto al pasar el cursor en botón primario */
#little-message-lite-reply-modal .button.button-primary:hover {
    background-color: #005a87;
}
/* Close button style - Estilo del botón de cerrar */
#little-message-lite-reply-close {
    position: absolute;
    top: -12px;
    right: -12px;
    background: #ff4d4d;
    color: white;
    border: none;
    border-radius: 50%;
    font-weight: bold;
    width: 28px;
    height: 28px;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    font-size: 18px;
    line-height: 16px;
    text-align: center;
}
/* Toast message container - Contenedor de mensajes tipo toast */
#little-message-lite-reply-toast {
    margin-top: 10px;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    border-radius: 6px;
    padding: 10px;
}
/* Success toast style - Estilo para toast de éxito */
#little-message-lite-reply-toast.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}
/* Error toast style - Estilo para toast de error   */
#little-message-lite-reply-toast.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}
/* Send reply button - Botón para enviar respuesta */
#little-message-lite-send-reply {
    position: relative;
    padding: 10px 40px;
    transition: background-color 0.3s;
    background: #0073aa;
    border: none;
    color: white;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
}
button.button-danger {
    background-color: #d63638;
    color: #fff;
    border-color: #a00;
}
button.button-danger:hover {
    background-color: #a00;
}
/* Hover effect for send button, only if not disabled - Efecto hover para botón enviar, solo si no está deshabilitado */
#little-message-lite-send-reply:hover:not(:disabled) {
    background: #005a87;
}
/* Disabled status for send button - Estado deshabilitado para botón enviar */
#little-message-lite-send-reply:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}
/* Spinner inside send button - Spinner dentro del botón enviar */
#little-message-lite-send-reply .little-message-lite-spinner {
    display: none;
    position: absolute;
    left: 12px;
    top: 50%;
    width: 16px;
    height: 16px;
    margin-top: -8px;
    border: 2px solid white;
    border-top-color: transparent;
    border-radius: 50%;
    animation: little-message-lite-spin 1s linear infinite;
    pointer-events: none;
}
/* Show spinner when loading - Mostrar spinner cuando está cargando */
#little-message-lite-send-reply.loading .little-message-lite-spinner {
    display: inline-block;
}
/* Dim text color when loading - Texto con opacidad cuando carga */
#little-message-lite-send-reply.loading {
    color: rgba(255,255,255,0.7);
}
/* Reuse spinner animation - Reusar animación del spinner */
@keyframes little-message-lite-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}