410 lines
11 KiB
CSS
410 lines
11 KiB
CSS
/* search.css - Fixed & Unified */
|
|
|
|
:root {
|
|
/* Dimensiones */
|
|
--sidebar-width: 260px;
|
|
--nav-height: 80px;
|
|
--content-max-width: 1800px;
|
|
|
|
/* Colores Base (Dark Mode) */
|
|
--c-bg-page: #09090b; /* Zinc-950 */
|
|
--c-bg-input: #18181b; /* Zinc-900 */
|
|
--c-bg-input-hover: #27272a;/* Zinc-800 */
|
|
|
|
/* Textos */
|
|
--c-text-main: #f4f4f5; /* Zinc-100 */
|
|
--c-text-muted: #a1a1aa; /* Zinc-400 */
|
|
|
|
/* Bordes y Acentos */
|
|
--c-border: rgba(255, 255, 255, 0.08);
|
|
--c-accent: #8b5cf6; /* Violet-500 */
|
|
}
|
|
|
|
/* =========================================
|
|
1. LAYOUT & BASE
|
|
========================================= */
|
|
.app-layout {
|
|
display: grid;
|
|
grid-template-columns: var(--sidebar-width) 1fr;
|
|
max-width: var(--content-max-width);
|
|
min-height: 100vh;
|
|
padding-top: var(--nav-height);
|
|
}
|
|
|
|
.main-view {
|
|
padding: 2.5rem 3rem;
|
|
width: 100%;
|
|
}
|
|
|
|
/* =========================================
|
|
2. SIDEBAR & FILTROS (DISEÑO MEJORADO)
|
|
========================================= */
|
|
.filters-sidebar {
|
|
position: sticky;
|
|
top: var(--nav-height);
|
|
height: calc(100vh - var(--nav-height));
|
|
border-right: 1px solid var(--c-border);
|
|
padding: 2rem 1.5rem 2rem 0;
|
|
margin-left: 2rem;
|
|
overflow-y: auto;
|
|
display: flex;
|
|
flex-direction: column;
|
|
/* Scrollbar oculta */
|
|
scrollbar-width: none;
|
|
-ms-overflow-style: none;
|
|
}
|
|
.filters-sidebar::-webkit-scrollbar { display: none; }
|
|
|
|
.filter-group {
|
|
margin-bottom: 1.5rem;
|
|
position: relative;
|
|
}
|
|
|
|
.filter-group label {
|
|
font-size: 0.75rem;
|
|
font-weight: 700;
|
|
color: var(--c-text-muted);
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.05em;
|
|
margin-bottom: 0.8rem;
|
|
display: block;
|
|
}
|
|
|
|
/* --- Mode Switcher --- */
|
|
.mode-switcher {
|
|
display: flex;
|
|
background: var(--c-bg-input);
|
|
padding: 4px;
|
|
border-radius: 8px;
|
|
border: 1px solid var(--c-border);
|
|
}
|
|
|
|
.mode-btn {
|
|
flex: 1;
|
|
background: transparent;
|
|
border: none;
|
|
color: var(--c-text-muted);
|
|
padding: 8px;
|
|
font-size: 0.85rem;
|
|
font-weight: 600;
|
|
border-radius: 6px;
|
|
cursor: pointer;
|
|
transition: all 0.2s ease;
|
|
}
|
|
|
|
.mode-btn:hover { color: var(--c-text-main); }
|
|
.mode-btn.active {
|
|
background: var(--c-bg-input-hover);
|
|
color: white;
|
|
box-shadow: 0 1px 3px rgba(0,0,0,0.3);
|
|
}
|
|
|
|
/* --- Inputs y Selects Modernos (Boxed Style) --- */
|
|
.custom-select select,
|
|
.filter-input {
|
|
width: 100%;
|
|
background-color: var(--c-bg-input);
|
|
border: 1px solid var(--c-border);
|
|
border-radius: 8px;
|
|
color: var(--c-text-main);
|
|
padding: 10px 12px;
|
|
font-size: 0.9rem;
|
|
cursor: pointer;
|
|
transition: all 0.2s;
|
|
appearance: none;
|
|
}
|
|
|
|
/* Icono flecha para selects */
|
|
.custom-select { position: relative; }
|
|
.custom-select::after {
|
|
content: '';
|
|
position: absolute;
|
|
right: 12px; top: 50%;
|
|
transform: translateY(-50%);
|
|
border-left: 5px solid transparent;
|
|
border-right: 5px solid transparent;
|
|
border-top: 5px solid var(--c-text-muted);
|
|
pointer-events: none;
|
|
}
|
|
|
|
.custom-select select:focus,
|
|
.filter-input:focus {
|
|
outline: none;
|
|
border-color: var(--c-accent);
|
|
background-color: var(--c-bg-page);
|
|
box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
|
|
}
|
|
|
|
/* --- Checkbox Simple & Toggle --- */
|
|
.checkbox-wrapper {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
padding: 8px 0;
|
|
cursor: pointer;
|
|
}
|
|
.checkbox-wrapper input[type="checkbox"] {
|
|
accent-color: var(--c-accent);
|
|
width: 18px; height: 18px;
|
|
cursor: pointer;
|
|
}
|
|
.checkbox-label {
|
|
font-size: 0.9rem;
|
|
color: var(--c-text-main);
|
|
}
|
|
.input-hint {
|
|
font-size: 0.7rem; color: var(--c-text-muted); margin-top: 4px; display: block;
|
|
}
|
|
|
|
/* =========================================
|
|
3. MULTISELECT AVANZADO (Searchable)
|
|
========================================= */
|
|
.multiselect-container {
|
|
background: var(--c-bg-input);
|
|
border: 1px solid var(--c-border);
|
|
border-radius: 8px;
|
|
overflow: hidden;
|
|
display: flex;
|
|
flex-direction: column;
|
|
}
|
|
|
|
/* Buscador interno */
|
|
.multiselect-search-wrapper {
|
|
padding: 8px;
|
|
border-bottom: 1px solid var(--c-border);
|
|
background: var(--c-bg-input);
|
|
position: sticky; top: 0; z-index: 2;
|
|
}
|
|
|
|
.multiselect-search-input {
|
|
width: 100%;
|
|
background: rgba(255,255,255,0.05);
|
|
border: none;
|
|
padding: 6px 10px;
|
|
border-radius: 4px;
|
|
color: var(--c-text-main);
|
|
font-size: 0.8rem;
|
|
}
|
|
.multiselect-search-input:focus { outline: none; background: rgba(255,255,255,0.1); }
|
|
|
|
/* Lista Items */
|
|
.multiselect-group {
|
|
max-height: 220px;
|
|
overflow-y: auto;
|
|
padding: 4px;
|
|
scrollbar-width: thin;
|
|
scrollbar-color: var(--c-border) transparent;
|
|
}
|
|
.multiselect-group::-webkit-scrollbar { width: 6px; }
|
|
.multiselect-group::-webkit-scrollbar-thumb { background-color: #3f3f46; border-radius: 3px; }
|
|
|
|
/* Item Individual */
|
|
.checkbox-item {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 10px;
|
|
padding: 8px 10px;
|
|
border-radius: 6px;
|
|
cursor: pointer;
|
|
font-size: 0.85rem;
|
|
color: var(--c-text-muted);
|
|
transition: background 0.15s;
|
|
}
|
|
|
|
.checkbox-item:hover { background-color: rgba(255,255,255,0.05); color: var(--c-text-main); }
|
|
.checkbox-item.is-selected {
|
|
background-color: rgba(139, 92, 246, 0.15);
|
|
color: #ddd6fe;
|
|
}
|
|
|
|
/* Checkbox Custom */
|
|
.checkbox-item input[type="checkbox"] {
|
|
appearance: none;
|
|
width: 16px; height: 16px;
|
|
border: 2px solid #52525b;
|
|
border-radius: 4px;
|
|
display: grid; place-content: center;
|
|
margin: 0;
|
|
background: transparent;
|
|
}
|
|
.checkbox-item input[type="checkbox"]::before {
|
|
content: ""; width: 8px; height: 8px;
|
|
transform: scale(0);
|
|
box-shadow: inset 1em 1em white;
|
|
transform-origin: center;
|
|
clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
|
|
background-color: white;
|
|
transition: 0.1s transform ease-in-out;
|
|
}
|
|
.checkbox-item input[type="checkbox"]:checked { background-color: var(--c-accent); border-color: var(--c-accent); }
|
|
.checkbox-item input[type="checkbox"]:checked::before { transform: scale(1); }
|
|
|
|
/* =========================================
|
|
4. HEADER & GRID RESULTADOS
|
|
========================================= */
|
|
.content-header {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: flex-end;
|
|
margin-bottom: 2.5rem;
|
|
flex-wrap: wrap;
|
|
gap: 1.5rem;
|
|
}
|
|
.header-left h1 { font-size: 2.5rem; font-weight: 800; margin: 0; line-height: 1; color: var(--c-text-main); }
|
|
#result-count { font-size: 0.9rem; color: var(--c-text-muted); margin-top: 5px; display: block; }
|
|
|
|
/* Barra de búsqueda */
|
|
.search-container { position: relative; width: 350px; max-width: 100%; }
|
|
#main-search {
|
|
width: 100%;
|
|
background: var(--c-bg-input);
|
|
border: 1px solid var(--c-border);
|
|
border-radius: 12px;
|
|
padding: 12px 16px 12px 42px;
|
|
color: white;
|
|
font-size: 0.95rem;
|
|
}
|
|
#main-search:focus {
|
|
border-color: var(--c-accent);
|
|
box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.1);
|
|
outline: none;
|
|
}
|
|
.search-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--c-text-muted); font-size: 1.1rem; }
|
|
.loader-spinner {
|
|
position: absolute; right: 12px; top: 50%; margin-top: -8px;
|
|
width: 16px; height: 16px;
|
|
border: 2px solid rgba(255,255,255,0.1); border-top-color: var(--c-accent);
|
|
border-radius: 50%; animation: spin 0.8s linear infinite; display: none;
|
|
}
|
|
|
|
/* Grid */
|
|
.media-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
|
|
gap: 3rem 2rem;
|
|
padding-bottom: 2rem;
|
|
}
|
|
|
|
/* Cards */
|
|
.card { cursor: pointer; display: flex; flex-direction: column; }
|
|
.card:hover .card-img-wrap img { transform: scale(1.05); }
|
|
.card:hover h3 { color: var(--c-accent); }
|
|
|
|
.card-img-wrap {
|
|
width: 100%; aspect-ratio: 2 / 3;
|
|
border-radius: 12px; overflow: hidden;
|
|
background-color: var(--c-bg-input);
|
|
margin-bottom: 1rem;
|
|
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
|
|
}
|
|
.card-img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; }
|
|
|
|
.card-content h3 {
|
|
font-size: 1rem; font-weight: 600; margin: 0 0 0.4rem 0;
|
|
color: var(--c-text-main);
|
|
display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
|
|
}
|
|
.card-content p { font-size: 0.85rem; color: var(--c-text-muted); margin: 0; }
|
|
|
|
/* =========================================
|
|
5. RESPONSIVE (MÓVIL)
|
|
========================================= */
|
|
|
|
/* Por defecto ocultamos los controles móviles en escritorio */
|
|
.mobile-header-controls { display: none; }
|
|
.overlay-backdrop {
|
|
position: fixed; inset: 0; background: rgba(0,0,0,0.6); backdrop-filter: blur(2px);
|
|
z-index: 900; opacity: 0; pointer-events: none; transition: opacity 0.3s ease;
|
|
}
|
|
.overlay-backdrop.active { opacity: 1; pointer-events: auto; }
|
|
|
|
@media (max-width: 1024px) {
|
|
:root { --sidebar-width: 0px; }
|
|
|
|
.app-layout { display: block; }
|
|
.main-view { padding: 1.5rem; }
|
|
|
|
/* Mostrar controles de cabecera en móvil */
|
|
.mobile-header-controls {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 1rem;
|
|
margin-bottom: 2rem;
|
|
}
|
|
|
|
.mobile-title { font-size: 1.25rem; font-weight: 700; color: var(--c-text-main); }
|
|
|
|
/* Botón hamburguesa */
|
|
.icon-btn-plain {
|
|
background: none; border: none; padding: 0;
|
|
color: var(--c-text-main); font-size: 1.5rem; cursor: pointer;
|
|
}
|
|
|
|
/* Sidebar Móvil (Drawer) */
|
|
.filters-sidebar {
|
|
position: fixed;
|
|
left: 0; top: 0;
|
|
height: 100dvh;
|
|
width: 85%; max-width: 320px;
|
|
background: var(--c-bg-page);
|
|
z-index: 1000;
|
|
transform: translateX(-100%);
|
|
transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
|
margin-left: 0;
|
|
padding: 2rem; /* Restauramos padding normal para el drawer */
|
|
box-shadow: 10px 0 30px rgba(0,0,0,0.5);
|
|
border-right: 1px solid var(--c-border);
|
|
}
|
|
|
|
.filters-sidebar.active { transform: translateX(0); }
|
|
|
|
.sidebar-header.mobile-only {
|
|
display: flex !important;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
}
|
|
|
|
.media-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 2rem 1rem; }
|
|
}
|
|
|
|
@keyframes spin { to { transform: rotate(360deg); } }
|
|
|
|
@media (max-width: 1024px) {
|
|
/* Aseguramos que el contenedor se muestre */
|
|
.mobile-header-controls {
|
|
display: flex !important;
|
|
align-items: center;
|
|
gap: 1rem;
|
|
margin-bottom: 1.5rem;
|
|
width: 100%;
|
|
position: relative;
|
|
z-index: 5; /* Por encima de elementos flotantes */
|
|
}
|
|
|
|
/* Estilo explícito para el botón */
|
|
#toggle-sidebar {
|
|
display: flex !important;
|
|
align-items: center;
|
|
justify-content: center;
|
|
width: 44px; /* Tamaño táctil mínimo */
|
|
height: 44px;
|
|
background: transparent;
|
|
border: 1px solid var(--c-border); /* Borde sutil para verlo si falla el icono */
|
|
border-radius: 8px;
|
|
color: var(--c-text-main);
|
|
font-size: 1.5rem; /* Tamaño del icono */
|
|
cursor: pointer;
|
|
padding: 0;
|
|
}
|
|
|
|
#toggle-sidebar:active {
|
|
background-color: var(--c-bg-input-hover);
|
|
}
|
|
|
|
/* Ajuste del título móvil */
|
|
.mobile-title {
|
|
font-size: 1.2rem;
|
|
font-weight: 700;
|
|
color: var(--c-text-main);
|
|
}
|
|
} |