/* =========================================================================
   ESTILOS AISLADOS EXCLUSIVOS PARA EL MÓDULO DE BUSCADOR DE DOMINIOS
   ========================================================================= */

:root {
    --brand-red: #D31027;
    --brand-red-dark: #9A0000;
    --bg-glass: rgba(255, 255, 255, 0.01);
    --border-glass: rgba(255, 255, 255, 0.12);
    --text-muted: #94a3b8;
}

#caja-busqueda {
    scroll-margin-top: 60px; /* 💻 Modifica este número para jugar con la altura en el ORDENADOR */
}

.module-domain-bg {
    background-color: #050507 !important; /* Coherente con las secciones */
    padding: 2.5rem 0 !important; 
}

.domain-section-container {
    margin: 0; 
    padding: 2.5rem 2rem; 
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
}

.domain-section-header h2 {
    font-size: 2.3rem !important;
    font-weight: 800;
    margin: 0 0 10px 0;
    color: #ffffff;
}

/* 🟢 OPTIMIZACIÓN ESCRITORIO: Un solo borde exterior nítido que engloba todo limpiamente */
.domain-search-wide-box {
    display: flex;
    width: 100%;
    background: #12131a; 
    border: 2px solid #334155; /* Un solo borde de alta visibilidad, sin dobles líneas */
    border-radius: 50px;
    padding: 6px 6px 6px 24px;
    box-sizing: border-box;
    transition: all 0.3s ease;
    align-items: center;
    margin-top: 2rem; 
    margin-bottom: 2rem;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.domain-search-wide-box:focus-within {
    border-color: var(--brand-red);
    box-shadow: 0 0 25px rgba(211, 16, 39, 0.25);
}

/* 🟢 OPTIMIZACIÓN ESCRITORIO: Campo integrado sin fondos dobles y alineado a la izquierda */
.domain-search-wide-box input[type="text"] { 
    flex: 1; 
    background: transparent; /* Eliminado el fondo gris interior repetido */
    border: none !important; /* Eliminado el borde doble interior */
    outline: none; 
    color: #ffffff; 
    font-size: 1.15rem; 
    font-family: 'Poppins', sans-serif; 
    font-weight: 500;
    padding: 12px 0;
    text-align: left !important; /* Estrictamente alineado a la izquierda en PC */
}
.domain-search-wide-box input[type="text"]::placeholder { 
    color: #55647a; 
}

.domain-search-wide-box button {
    background: linear-gradient(90deg, var(--brand-red-dark), var(--brand-red));
    color: #ffffff; border: none; padding: 16px 38px; font-size: 1.05rem; font-weight: 600; border-radius: 50px; cursor: pointer; font-family: 'Poppins', sans-serif; display: flex; align-items: center; gap: 8px; transition: all 0.2s ease;
    z-index: 2;
}
.domain-search-wide-box button:hover { transform: scale(1.02); box-shadow: 0 4px 15px rgba(211, 16, 39, 0.4); }
.domain-search-wide-box button:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.search-icon-svg { width: 18px; height: 18px; }

.domain-results-wrapper { width: 100%; display: flex; flex-direction: column; gap: 12px; }

.grid-item-dom {
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    background: #0f1015; 
    border: 1px solid var(--border-glass); 
    border-radius: 12px; 
    padding: 18px 24px; 
    box-sizing: border-box; 
    animation: fadeInUp 0.4s ease forwards; 
    gap: 15px;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.info-dom {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    width: 100%;
}
.dom-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}
.dom-title { font-size: 1.15rem; font-weight: 600; color: #ffffff; }

/* 2. Las etiquetas de estado (LIBRE / REGISTRADO) */
.badge {
    display: inline-block;
    text-align: center;
    border-radius: 6px;    /* Esquinas un pelín suavizadas */
    font-weight: 700;      /* Destacado en negrita */
    text-transform: uppercase; /* Opcional: en mayúsculas impacta más */
    letter-spacing: 0.5px;  /* Separa un pelín las letras para que sea ultra-legible */
    
    /* 🟢 JUEGA AQUÍ CON EL TAMAÑO Y RELLENO DEL BADGE */
    font-size: 0.95rem;     /* Subido para que tenga más autoridad visual */
    padding: 5px 12px;     /* Más espacio interno (arriba/abajo izquierda/derecha) para que respire */
    
    margin-top: 6px;
    margin-bottom: 8px;
}
.badge-disponible { background: rgba(34, 197, 94, 0.12); color: #4ade80; border: 1px solid rgba(34, 197, 94, 0.25); }
.badge-ocupado { background: rgba(239, 68, 68, 0.12); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.25); }

/* 1. Las frases promocionales de abajo */
.dom-status {
    text-align: center;
    display: block;
    margin-top: 6px;
    
    /* 🔴 JUEGA AQUÍ CON EL TAMAÑO DE LA FRASE */
    font-size: 0.9rem;      /* Antes heredaba 1rem. Un 0.9rem o 0.85rem lo hace fino y elegante */
    color: #8b949e;        /* Un tono un pelín más atenuado para que no compita con el blanco */
    font-weight: 400;      /* Letra normal, sin negrita */
}
.puedes-registrar { color: #a3e635; }
.ya-registrado { color: var(--text-muted); }

.action-buttons {
    display: flex !important;
    gap: 10px !important;
    justify-content: center !important; /* Centra los botones cuando se queden en uno solo o bajen */
    flex-wrap: wrap !important;        /* 🚀 Rompe en dos filas si no caben, evitando que se salgan */
    width: 100% !important;            /* Asegura que la caja de botones use todo el espacio interior */
}
.btn-action { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; font-size: 0.85rem; font-weight: 600; padding: 8px 18px; border-radius: 8px; transition: background 0.2s ease; color: #ffffff; white-space: nowrap !important;}

.btn-registrar-email { background: #1e293b; border: 1px solid #334155; }
.btn-registrar-email:hover { background: #334155; }
.btn-registrar-wa { background: #15803d; }
.btn-registrar-wa:hover { background: #166534; }
.btn-traslado-email { background: #1e293b; border: 1px solid #334155; }
.btn-traslado-email:hover { background: #334155; }
.btn-traslado-wa { background: #1e293b; border: 1px solid #334155; }
.btn-traslado-wa:hover { background: #334155; }

.domain-history-card {
    width: 100%; margin-top: 1.5rem; background: rgba(0, 0, 0, 0.3); border: 1px solid var(--border-glass); border-radius: 12px; padding: 20px 24px; box-sizing: border-box;
}

.history-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; border-bottom: 1px solid rgba(255, 255, 255, 0.05); padding-bottom: 8px; }
.history-header h3 { font-size: 0.95rem; color: #cbd5e1; font-weight: 600; margin: 0; }
.btn-clear-all { background: transparent; border: none; color: #f87171; font-size: 0.8rem; font-weight: 600; cursor: pointer; font-family: 'Poppins', sans-serif; padding: 2px 6px; border-radius: 4px; }
.btn-clear-all:hover { background: rgba(239, 68, 68, 0.08); }

.history-list { list-style: none; padding: 0; margin: 0; text-align: left; }
.history-item { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.04); font-size: 0.92rem; }
.history-item:last-child { border-bottom: none; }

.domain-name { color: #ffffff; font-weight: 400; transition: color 0.2s ease; }
.domain-name:hover { color: var(--brand-red); }
.btn-delete { background: transparent; border: none; color: #475569; font-size: 1.1rem; cursor: pointer; padding: 0 4px; }
.btn-delete:hover { color: #ef4444; }

.desplegable-historial-contenedor { margin-top: 14px; width: 100%; text-align: center; }
.btn-desplegar-historial { background: rgba(255, 255, 255, 0.04); color: #94a3b8; border: 1px solid var(--border-glass); padding: 6px 18px; font-size: 0.8rem; font-weight: 600; border-radius: 20px; cursor: pointer; transition: all 0.2s ease; font-family: 'Poppins', sans-serif; }
.btn-desplegar-historial:hover { background: rgba(255, 255, 255, 0.08); color: #ffffff; }
.btn-desplegar-historial.activo { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.2); }
.badge-fecha-historial { font-size: 0.7rem; color: #64748b; background: rgba(255, 255, 255, 0.02); padding: 1px 6px; border-radius: 4px; border: 1px solid rgba(255, 255, 255, 0.04); }
.antigua-item .domain-name { color: #64748b; }

.instruction-cta-banner { background: rgba(211, 16, 39, 0.05); border-left: 3px solid var(--brand-red); padding: 15px 20px; border-radius: 0 12px 12px 0; margin-top: 1rem; animation: fadeIn 0.3s ease; }
.instruction-cta-banner p { font-size: 0.88rem; color: #e2e8f0; margin: 0; line-height: 1.5; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.domain-value-features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.domain-mini-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: 20px;
    border-radius: 12px;
    text-align: left;
}

.domain-mini-card h3 {
    font-size: 1rem;
    margin: 0 0 8px 0;
    color: #ffffff;
    font-weight: 600;
}

.domain-mini-card p {
    font-size: 0.85rem;
    color: #cbd5e1;
    margin: 0;
    line-height: 1.5;
    font-weight: 300;
}

@media (max-width: 860px) {
    .domain-value-features-grid { grid-template-columns: 1fr; gap: 14px; }
}

@media (max-width: 600px) {
    .domain-section-container { padding: 1.5rem 1rem; }
    /* 🟢 INTEGRACIÓN RESPONSIVE: Estilo adaptado verticalmente en smartphones para máxima ergonomía táctil */
    .domain-search-wide-box { border-radius: 20px; flex-direction: column; padding: 14px; gap: 12px; background: transparent; border: none; box-shadow: none; }
    .domain-search-wide-box input[type="text"] { width: 100%; text-align: left !important; font-size: 1.1rem; border-radius: 30px; border: 2px solid #334155 !important; background: #12131a; padding: 14px; margin-right: 0; }
    .domain-search-wide-box button { width: 100%; justify-content: center; padding: 14px; }
    .grid-item-dom {
        flex-direction: column;
        justify-content: center;
        text-align: center;
        padding: 20px 15px; /* Ajustamos un pelín los márgenes en pantallas pequeñas */
    }
    .dom-header { justify-content: center; }
    .action-buttons { flex-direction: column; flex-wrap: wrap; width: 100%;}
    .btn-action { justify-content: center; }

    #caja-busqueda {
        scroll-margin-top: 90px; /* 📱 Modifica este número para jugar con la altura en el MÓVIL */
    }
}