
.select-container {
  display: flex;
  justify-content: center;
  width: 100%;
}

.custom-select {
  width: 120px;
  padding: 4px 8px;
  border: 1px solid #ccc;
  border-radius: 3px;
  font-size: 14px;
}

.text-contenedor {
    display: flex;
    width: 100%;
    height: 100%;
}

.text-columna-izquierda {
    flex: 0 0 25%;
    padding: 10px;
    display: flex;
    flex-direction: column;
}

.text-columna-derecha {
    flex: 0 0 75%;
    padding: 10px;
    display: flex;
    flex-direction: column;
}

/* Responsividad para dispositivos móviles */
@media (max-width: 768px) {
    .text-contenedor {
        flex-direction: column;
    }
    
    .text-columna-izquierda {
        flex: 0 0 25%;
        order: 2;
        flex-direction: row; /* Cambia a horizontal */
        overflow-x: auto; /* Scroll horizontal */
        white-space: nowrap; /* Evita saltos de línea */
        gap: 10px;
    }
    
    .text-columna-derecha {
        flex: 0 0 75%;
        order: 1;
    }
    
    /* Opcional: para que los elementos hijos no se reduzcan */
    .text-columna-izquierda > * {
        flex-shrink: 0;
    }
}

.input-texto {
    width: calc(100% - 20px);
    height: calc(100% - 20px);
    margin: 10px;
    padding: 12px;
    border: 1px solid #686868;
    border-radius: 4px;
    font-family: "Times New Roman", Times, serif;
    color: rgb(255, 255, 255);
    font-size: 16px;
    box-sizing: border-box;
    resize: none;
    overflow-y: auto;
    position: relative;
    background-color: #000000;
}

.contador-caracteres {
    position: absolute;
    bottom: 5px; /* Cambiado de top a bottom */
    right: 15px;
    font-size: 12px;
    color: #666;
    background-color: rgba(255, 255, 255, 0.8);
    padding: 2px 6px;
    border-radius: 10px;
    pointer-events: none;
}

.text-columna-derecha {
    position: relative;
}

/* Para móviles */
@media (max-width: 768px) {
    .input-texto {
        width: calc(100% - 20px);
        height: calc(100% - 20px);
        margin: 10px;
    }
    
    .contador-caracteres {
        right: 20px;
        bottom: 10px; /* Ajuste para móviles */
    }
}

.archivo-btn {
    display: inline-block;
    padding: 10px 20px;
    background: linear-gradient(to bottom, #ffffff, #f0f0f0);
    color: #000000;
    text-decoration: none;
    border: 1px solid #d0d0d0;
    border-radius: 5px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    text-align: center;
}

.archivo-btn:hover {
    background: linear-gradient(to bottom, #f8f8f8, #e8e8e8);
    border-color: #b0b0b0;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}

.archivo-btn:active {
    background: linear-gradient(to bottom, #e8e8e8, #d8d8d8);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    transform: translateY(0);
}


.text-btn {
    padding: 10px 20px;
    background: linear-gradient(to bottom, #000000, #333333);
    color: #ffffff;
    border: none;
    border-radius: 5px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
    text-align: center;
    text-decoration: none;
}

.text-btn:hover {
    background: linear-gradient(to bottom, #222222, #444444);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
    transform: translateY(-1px);
}

.text-btn:active {
    background: linear-gradient(to bottom, #111111, #222222);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    transform: translateY(0);
}


.text-btn {
    position: relative;
    padding: 10px 20px;
    background: linear-gradient(to bottom, #000000, #333333);
    color: #ffffff;
    border: none;
    border-radius: 5px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
    text-align: center;
    text-decoration: none;
}

.text-btn:hover {
    background: linear-gradient(to bottom, #222222, #444444);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
    transform: translateY(-1px);
}

.text-btn:active {
    background: linear-gradient(to bottom, #111111, #222222);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    transform: translateY(0);
}

/* Spinner visible */
.btn-loading {
    position: relative;
    color: transparent !important;
}

.btn-loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 3px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Overlay de carga para toda la página */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

.loading-text {
    color: white;
    margin-top: 20px;
    font-size: 18px;
}

/* Mostrar cuando hay una solicitud HTMX */
.htmx-request .loading-overlay {
    display: flex;
    flex-direction: column;
}





.txt-cloc-container {
        display: flex;
        justify-content: center;
        align-items: flex-start;
        padding-top: 20px;
        height: auto; /* Altura automática */
        overflow: hidden;
        background: transparent;
    }
    
    .txt-cloc-image {
        max-width: 80%; /* Reducir tamaño en móviles */
        max-height: 80%;
        object-fit: contain;
    }

    /* Para móviles */
    @media (max-width: 768px) {
        .txt-cloc-container {
            align-items: flex-start;
            padding-top: 10px;
            height: auto;
            min-height: auto; /* Eliminar altura mínima */
        }
        
        .txt-cloc-image {
            max-width: 60%; /* Más pequeña en móviles */
            max-height: 60%;
            margin-top: 0; /* Asegurar que esté arriba */
        }
    }