/*
 * CORE.INPUT.SEARCH.CSS
 * Estilo Google para el buscador incremental
 */

/* ===== Contenedor del buscador ===== */
.tis-wrapper {
    position: relative;
    width: 100%;
}

/* ===== Grupo input + iconos ===== */
.tis-input-group {
    display: flex;
    align-items: center;
    background: #fff;
    border: 2px solid #c8c8c8;
    border-radius: 24px;
    padding: 0 14px;
    height: 36px;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-shadow: none;
}

.tis-input-group:focus-within {
    border-color: #1a73e8;
    box-shadow: 0 2px 8px rgba(26, 115, 232, 0.18);
}

/* ===== Icono lupa ===== */
.tis-icon-left {
    color: #9aa0a6;
    font-size: 14px;
    margin-right: 10px;
    line-height: 1;
}

/* ===== Campo de texto ===== */
.tis-input {
    flex: 1;
    border: none !important;
    outline: none !important;
    background: transparent !important;
    font-size: 14px;
    color: #202124;
    padding: 0 !important;
    box-shadow: none !important;
    height: 100%;
}

.tis-input::placeholder {
    color: #80868b;
}

/* ===== Botón X para limpiar ===== */
.tis-clear-btn {
    cursor: pointer;
    color: #9aa0a6;
    font-size: 13px;
    padding-left: 6px;
    line-height: 1;
    transition: color 0.15s;
}

.tis-clear-btn:hover {
    color: #5f6368;
}

/* ===== Panel de resultados ===== */
.tis-results {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.16);
    z-index: 9999;
    max-height: 280px;
    overflow-y: auto;
    animation: tis-fade-in 0.12s ease;
}

@keyframes tis-fade-in {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== Cada resultado ===== */
.tis-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    cursor: pointer;
    transition: background 0.1s;
    font-size: 14px;
    color: #202124;
    border-bottom: 1px solid #f1f3f4;
}

.tis-item:last-child {
    border-bottom: none;
}

.tis-item:hover,
.tis-item.tis-active {
    background: #f1f8ff;
}

.tis-item-icon {
    color: #9aa0a6;
    font-size: 13px;
    flex-shrink: 0;
}

.tis-item-text {
    flex: 1;
    word-break: break-word;
}

.tis-item-text strong {
    color: #1a73e8;
}

/* ===== Estado de carga / mensaje ===== */
.tis-status {
    padding: 12px 16px;
    font-size: 13px;
    color: #80868b;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tis-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid #e0e0e0;
    border-top-color: #1a73e8;
    border-radius: 50%;
    animation: tis-spin 0.6s linear infinite;
}

@keyframes tis-spin {
    to {
        transform: rotate(360deg);
    }
}

/* ===== Adaptación al tema oscuro del modal ===== */
.modal .tis-input-group {
    background: #2b2b3b;
    border-color: #8a8383;
}

.modal .tis-input {
    color: #e0e0e0;
    background: transparent !important;
}

.modal .tis-input::placeholder {
    color: #67d3f1;
    font-weight: bold;
}

.modal .tis-input-group:focus-within {
    border-color: #546bf9;
    box-shadow: 0 0 8px rgba(84, 107, 249, 0.3);
}

.modal .tis-icon-left {
    color: #67d3f1;
}

.modal .tis-clear-btn {
    color: #9aa0a6;
}