﻿/* ==========================================================
   EMPLEOIA
   RESULTADOS DE BÃšSQUEDA
   ========================================================== */


/* ==========================================================
   CABECERA DE RESULTADOS
   ========================================================== */

.results-header-top {
    max-width: 1500px;
    margin: 32px auto 22px;
    padding: 0 24px;
}

.results-header-top h1 {
    margin: 0 0 6px;

    font-size: 34px;
    font-weight: 800;
    line-height: 1.2;

    color: #111827;
}

.results-header-top p {
    margin: 0;

    font-size: 15px;
    line-height: 1.5;

    color: #64748b;
}


/* ==========================================================
   CONTENEDOR PRINCIPAL
   ========================================================== */

.results-container {
    max-width: 1500px;

    margin: 0 auto;
    padding: 0 24px;

    display: grid;

    /*
       IZQUIERDA   CENTRO   DERECHA
       ofertas     detalle  publicidad
    */

    grid-template-columns:
        minmax(280px, 340px)
        minmax(520px, 1fr)
        minmax(220px, 280px);

    gap: 24px;

    align-items: start;
}


/* ==========================================================
   COLUMNA IZQUIERDA
   ========================================================== */

.results-sidebar {
    display: flex;
    flex-direction: column;

    gap: 18px;

    min-width: 0;
}


/* ==========================================================
   LISTA DE OFERTAS
   ========================================================== */

.results-list {
    display: flex;
    flex-direction: column;

    gap: 4px;

    min-width: 0;
}


/* ==========================================================
   PANEL CENTRAL
   ========================================================== */

.results-detail {
    min-width: 0;

    background: #ffffff;

    border: 1px solid #e5e7eb;
    border-radius: 14px;

    padding: 28px;

    min-height: 650px;

    position: sticky;
    top: 20px;

    box-sizing: border-box;
}


/* ==========================================================
   CABECERA DE LA OFERTA
   ========================================================== */

.offer-header {
    margin: 0 0 18px;
}

.offer-header h2 {
    margin: 0 0 6px;

    font-size: 28px;
    font-weight: 400;
    line-height: 1.2;

    color: #111827;
}

.offer-company {
    margin: 0;

    font-size: 15px;
    line-height: 1.5;

    color: #64748b;
}


/* ==========================================================
   INFORMACIÃ“N PRINCIPAL
   LOCALIDAD / CONTRATO / SALARIO / JORNADA
   ========================================================== */

.offer-meta {
    display: flex;
    flex-wrap: wrap;

    gap: 10px 18px;

    margin: 0 0 24px;
    padding-bottom: 20px;

    border-bottom: 1px solid #e5e7eb;

    font-size: 14px;
    line-height: 1.5;

    color: #475569;
}

.offer-meta span {
    display: inline-flex;
    align-items: center;

    white-space: nowrap;
}


/* ==========================================================
   SECCIONES DE LA OFERTA
   ========================================================== */

.offer-section {
    margin: 24px 0 0;
    padding: 0;

    background: transparent;

    border: 0;
    border-radius: 0;
}

.offer-section:first-of-type {
    margin-top: 0;
}


/* ==========================================================
   TÃTULO DE LA SECCIÃ“N
   ========================================================== */

.offer-section h3 {
    margin: 0 0 16px;
    padding: 0;

    font-size: 20px;
    font-weight: 400;
    line-height: 1.3;

    color: #111827;
}


/* ==========================================================
   DESCRIPCIÃ“N
   ========================================================== */

.offer-description-content {
    margin: 0;
    padding: 0;

    font-size: 15px;
    line-height: 1.55;

    color: #374151;

    overflow-wrap: anywhere;
}


/* ==========================================================
   PÃRRAFOS
   ========================================================== */

.offer-description-content p {
    margin: 0 0 10px;
    padding: 0;

    font-size: 15px;
    line-height: 1.55;

    color: #374151;
}

.offer-description-content p:last-child {
    margin-bottom: 0;
}


/* ==========================================================
   TÃTULOS INTERNOS
   ========================================================== */

.offer-description-content h4 {
    margin: 17px 0 7px;
    padding: 0;

    font-size: 15px;
    font-weight: 400;
    line-height: 1.35;

    color: #111827;
}

.offer-description-content h4:first-child {
    margin-top: 0;
}


/* ==========================================================
   LISTAS
   ========================================================== */

.offer-description-content ul {
    margin: 5px 0 11px;
    padding-left: 21px;
}

.offer-description-content li {
    margin: 0 0 4px;
    padding: 0;

    font-size: 15px;
    line-height: 1.5;

    color: #374151;
}

.offer-description-content li:last-child {
    margin-bottom: 0;
}


/* ==========================================================
   EVITAR MÃRGENES HEREDADOS
   ========================================================== */

.offer-description-content > :first-child {
    margin-top: 0;
}

.offer-description-content > :last-child {
    margin-bottom: 0;
}


/* ==========================================================
   DESCRIPCIONES ANTIGUAS
   ========================================================== */

.offer-description-content br {
    display: block;

    margin: 0;
    padding: 0;
}


/* ==========================================================
   BOTÃ“N OFERTA ORIGINAL
   ========================================================== */

.offer-action {
    margin-top: 30px;
    padding-top: 22px;

    border-top: 1px solid #e5e7eb;
}

.apply-button {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;

    width: auto;
    min-height: auto;

    margin-top: 12px;
    padding: 5px 10px;

    border: 1px solid #d1d5db;
    border-radius: 5px;

    background: transparent;

    color: #2563eb;
    font-size: 16px;
    font-weight: 500;

    text-decoration: none;

    transition: all .2s ease;
}

.save-offer-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    margin-left: 14px;
    padding: 5px 10px;

    border: 1px solid #d1d5db;
    border-radius: 6px;

    background: #ffffff;
    color: #475569;

    font-family: inherit;
    font-size: 14px;
    font-weight: 500;

    cursor: pointer;

    transition:
        background-color .18s ease,
        border-color .18s ease,
        color .18s ease;
}

.save-offer-button:hover {
    background: #f8fafc;
    border-color: #94a3b8;
    color: #1e3a5f;
}

.apply-button:hover {
    background: #eff6ff;
    color: #1d4ed8;
    transform: none;
    box-shadow: none;
    text-decoration: none;
}

.apply-button-disabled {
    background: #94a3b8;

    cursor: default;
}

.apply-button-disabled:hover {
    background: #94a3b8;

    transform: none;
}


/* ==========================================================
   COLUMNA DERECHA
   PUBLICIDAD / REGISTRO / ALERTAS
   ========================================================== */

.results-extra {
    min-width: 0;
}

.results-ad-placeholder {
    width: 100%;
    min-height: 300px;

    display: flex;

    align-items: center;
    justify-content: center;

    border: 1px solid #e5e7eb;
    border-radius: 12px;

    background: #ffffff;

    box-sizing: border-box;
}

.results-ad-placeholder span {
    font-size: 13px;

    color: #94a3b8;
}


/* ==========================================================
   PANEL VACÃO
   ========================================================== */

.empty-detail {
    min-height: 550px;

    display: flex;

    flex-direction: column;

    align-items: center;
    justify-content: flex-start;

    text-align: center;

    color: #64748b;
}

.empty-detail h2 {
    margin: 0 0 10px;

    font-size: 22px;
    font-weight: 400;

    color: #111827;
}

.empty-detail p {
    margin: 0;

    font-size: 15px;
}


/* ==========================================================
   RESULTADOS VACÃOS
   ========================================================== */

.empty-results {
    padding: 30px 20px;

    text-align: center;

    border: 1px solid #e5e7eb;
    border-radius: 10px;

    background: #ffffff;

    color: #64748b;
}


/* ==========================================================
   RESPONSIVE
   ========================================================== */


/* ----------------------------------------------------------
   TABLET
   ---------------------------------------------------------- */

@media (max-width: 1200px) {

    .results-container {
        grid-template-columns:
            minmax(250px, 300px)
            minmax(480px, 1fr);

        gap: 20px;
    }

    .results-extra {
        display: none;
    }

}


/* ----------------------------------------------------------
   MÃ“VIL / TABLET PEQUEÃ‘A
   ---------------------------------------------------------- */

@media (max-width: 900px) {

    .results-header-top {
        margin-top: 24px;
        padding: 0 18px;
    }

    .results-header-top h1 {
        font-size: 28px;
    }

    .results-container {
        grid-template-columns: 1fr;

        padding: 0 18px;

        gap: 18px;
    }

    .results-sidebar {
        order: 1;
    }

    .results-detail {
        order: 2;

        position: static;

        min-height: auto;

        padding: 22px;
    }

    .results-extra {
        display: none;
    }

}


/* ----------------------------------------------------------
   MÃ“VIL
   ---------------------------------------------------------- */

@media (max-width: 600px) {

    .results-header-top {
        padding: 0 14px;
    }

    .results-header-top h1 {
        font-size: 24px;
    }

    .results-container {
        padding: 0 14px;
    }

    .results-detail {
        padding: 18px;
        border-radius: 10px;
    }

    .offer-header h2 {
        font-size: 23px;
    font-weight: 400;
    }

    .offer-meta {
        flex-direction: column;
        align-items: flex-start;

        gap: 4px;
    }

    .offer-section h3 {
        font-size: 18px;
    font-weight: 400;
    }

    .offer-description-content,
    .offer-description-content p,
    .offer-description-content li {
        font-size: 14px;
    }

}

/* ==========================================================
   JOBSENSIA - BUSCADOR
   ========================================================== */

.results-center {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.results-search-box {
    width: 100%;
    box-sizing: border-box;
    padding: 16px 18px;

    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
}

.results-search-form {
    display: flex;
    align-items: center;

    width: 100%;
    height: 58px;
    box-sizing: border-box;

    margin: 0;

    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 12px;

    overflow: visible;
}

.results-search-form input {
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
    height: 58px;

    margin: 0;
    padding: 0 18px;

    box-sizing: border-box;

    border: 0;
    outline: 0;

    background: transparent;

    color: #111827;
    font-family: inherit;
    font-size: 16px;
}

.results-search-form input::placeholder {
    color: #64748b;
    opacity: 1;
}

.results-search-form button {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 58px;
    height: 58px;
    min-width: 58px;

    margin: 0;
    padding: 0;

    flex: 0 0 58px;

    border: 0;
    background: transparent;

    cursor: pointer;
}

.results-search-form button span {
    display: inline-block;

    font-size: 23px;
    line-height: 1;

    background: linear-gradient(
        135deg,
        #ff3b30,
        #ff9500,
        #ffd60a,
        #34c759,
        #00c7be,
        #007aff,
        #af52de,
        #ff2d55
    );

    -webkit-background-clip: text;
    background-clip: text;

    -webkit-text-fill-color: transparent;
    color: transparent;

    transition: transform .18s ease;
}

.results-search-form button:hover span {
    transform: scale(1.12);
}

.results-center > .results-detail {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}





/* ==========================================================
   PANEL LATERAL DE FILTROS - FASE 1
   SOLO INTERFAZ
   ========================================================== */

.filters-panel-wrapper {
    width: 100%;
    position: relative;
}


/* ==========================================================
   BOTÓN FILTROS
   ========================================================== */

.filters-open-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    width: 100%;
    min-height: 46px;
    padding: 10px 16px;

    box-sizing: border-box;

    border: 1px solid #94a3b8;
    border-radius: 10px;

    background: #e8eef5;
    color: #1e3a5f;

    font-family: inherit;
    font-size: 16px;
    font-weight: 600;

    cursor: pointer;

    box-shadow: 0 2px 6px rgba(15, 23, 42, .08);

    transition:
        background-color .18s ease,
        border-color .18s ease,
        box-shadow .18s ease,
        transform .18s ease;
}

.filters-open-button:hover {
    background: #e8eef5;
    border-color: #94a3b8;
    box-shadow: 0 3px 8px rgba(15, 23, 42, .12);
    transform: translateY(-1px);
}

.filters-open-button span:first-child {
    font-size: 17px;
    line-height: 1;
}


/* ==========================================================
   CAPA OSCURA
   ========================================================== */

.filters-overlay {
    position: fixed;

    inset: 0;

    z-index: 9998;

    background: rgba(15, 23, 42, .38);

    opacity: 0;
    visibility: hidden;

    pointer-events: none;

    transition:
        opacity .25s ease,
        visibility .25s ease;
}

.filters-overlay.is-visible {
    opacity: 1;
    visibility: visible;

    pointer-events: auto;
}


/* ==========================================================
   PANEL
   ========================================================== */

.filters-drawer {
    position: fixed;

    top: 0;
    left: 0;
    bottom: 0;

    z-index: 9999;

    width: 380px;
    max-width: 90vw;

    box-sizing: border-box;

    display: flex;
    flex-direction: column;

    background: #ffffff;

    border-right: 1px solid #e5e7eb;

    box-shadow: 8px 0 30px rgba(15, 23, 42, .12);

    transform: translateX(-100%);

    transition:
        transform .28s ease;
}

.filters-drawer.is-open {
    transform: translateX(0);
}


/* ==========================================================
   CABECERA
   ========================================================== */

.filters-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    flex: 0 0 auto;

    padding: 20px 22px;

    border-bottom: 1px solid #e5e7eb;
}

.filters-drawer-header h2 {
    margin: 0;

    font-size: 20px;
    font-weight: 500;
    line-height: 1.2;

    color: #111827;
}

.filters-close-button {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 36px;
    height: 36px;

    padding: 0;

    border: 0;
    border-radius: 8px;

    background: transparent;

    color: #475569;

    font-family: inherit;
    font-size: 27px;
    font-weight: 300;
    line-height: 1;

    cursor: pointer;

    transition:
        background-color .18s ease,
        color .18s ease;
}

.filters-close-button:hover {
    background: #f1f5f9;
    color: #111827;
}


/* ==========================================================
   CONTENIDO
   ========================================================== */

.filters-drawer-content {
    flex: 1 1 auto;

    overflow-y: auto;

    padding: 20px 22px;
}


/* ==========================================================
   SECCIONES
   ========================================================== */

.filter-section {
    margin: 0;
    padding: 0 0 22px;
}

.filter-section + .filter-section {
    padding-top: 20px;

    border-top: 1px solid #eef2f7;
}

.filter-section h3 {
    margin: 0 0 13px;

    font-size: 14px;
    font-weight: 500;
    line-height: 1.3;

    color: #111827;
}


/* ==========================================================
   OPCIONES
   ========================================================== */

.filter-option {
    display: flex;
    align-items: center;

    gap: 10px;

    min-height: 34px;

    margin: 0;

    color: #374151;

    font-size: 14px;
    font-weight: 400;

    cursor: pointer;
}

.filter-option + .filter-option {
    margin-top: 5px;
}

.filter-option input[type="checkbox"],
.filter-option input[type="radio"] {
    width: 16px;
    height: 16px;

    margin: 0;

    flex: 0 0 auto;

    accent-color: #2563eb;

    cursor: pointer;
}

.filter-option-column {
    flex-direction: column;
    align-items: flex-start;

    gap: 8px;

    cursor: default;
}

.filter-option-column input[type="number"] {
    width: 100%;

    height: 42px;

    padding: 0 12px;

    box-sizing: border-box;

    border: 1px solid #d1d5db;
    border-radius: 8px;

    background: #ffffff;

    color: #111827;

    font-family: inherit;
    font-size: 14px;

    outline: none;
}

.filter-option-column input[type="number"]:focus {
    border-color: #94a3b8;
    box-shadow: 0 0 0 3px rgba(148, 163, 184, .15);
}


/* ==========================================================
   BOTONES INFERIORES
   ========================================================== */

.filters-drawer-actions {
    display: flex;
    align-items: center;
    gap: 10px;

    flex: 0 0 auto;

    padding: 16px 22px;

    border-top: 1px solid #e5e7eb;

    background: #ffffff;
}

.filters-clear-button,
.filters-apply-button {
    height: 44px;

    padding: 0 16px;

    border-radius: 8px;

    font-family: inherit;
    font-size: 14px;
    font-weight: 500;

    cursor: pointer;
}

.filters-clear-button {
    flex: 0 0 auto;

    border: 1px solid #d1d5db;

    background: #ffffff;

    color: #475569;
}

.filters-clear-button:hover {
    background: #f8fafc;
}

.filters-apply-button {
    flex: 1 1 auto;

    border: 1px solid #111827;

    background: #111827;

    color: #ffffff;
}

.filters-apply-button:hover {
    background: #1f2937;
}


/* ==========================================================
   CUANDO EL PANEL ESTÁ ABIERTO
   ========================================================== */

body.filters-drawer-open {
    overflow: hidden;
}


/* ==========================================================
   MÓVIL
   ========================================================== */

@media (max-width: 600px) {

    .filters-drawer {
        width: 100%;
        max-width: 100%;
    }

    .filters-drawer-header {
        padding: 18px;
    }

    .filters-drawer-content {
        padding: 18px;
    }

    .filters-drawer-actions {
        padding: 14px 18px;
    }

}


/* ==========================================================
   FORMULARIO DEL PANEL DE FILTROS
   Permite desplazamiento interno del contenido
   ========================================================== */

.filters-form {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
}

.filters-form .filters-drawer-content {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
}


.save-offer-star {
    color: #eab308;
    font-size: 16px;
    margin-right: 4px;
}


/* ==========================================================
   HISTORIAL - AJUSTE BUSCADOR DE RESULTADOS
   ========================================================== */

.results-search-form .jobsensia-history-wrapper {
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
    height: 100%;
}

.results-search-form .jobsensia-history-wrapper input {
    width: 100%;
}


/* ==========================================================
   HISTORIAL - ANCHO COMPLETO EN BUSCADOR DE RESULTADOS
   ========================================================== */

.results-search-form .jobsensia-history-wrapper {
    position: relative;
    flex: 1 1 0;
    min-width: 0;
    width: 0;
    height: 100%;
    display: flex;
}

.results-search-form .jobsensia-history-wrapper .search-history {
    left: 0;
    right: 0;
    width: 100%;
    min-width: 100%;
    box-sizing: border-box;
}

.results-search-form .jobsensia-history-wrapper .search-history-item {
    white-space: nowrap;
}


/* ==========================================================
   HISTORIAL - ESPACIADO DE LOS ELEMENTOS
   ========================================================== */

.results-search-form .search-history-item {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 11px 18px;
    margin: 0;
    border: 0;
    border-bottom: 1px solid #f0f0f0;
    background: #ffffff;
    text-align: left;
    white-space: nowrap;
}



/* ==========================================================
   ESTRELLA BUSCAR - RESULTADOS
   ========================================================== */

.results-search-form button span {
    display: inline-block;
    transform: scale(1.7);
}

.results-search-form button:hover span {
    transform: scale(1.9);
}


/* ==========================================================
   CORRECCION TAMAÑO MICROFONO - BUSCADOR RESULTADOS
   ========================================================== */

.results-search-form .voice-search-button {
    transform: none !important;
}

.results-search-form .voice-search-button img {
    width: 24px !important;
    height: 24px !important;
    transform: none !important;
}


/* ==========================================================
   MENSAJE PEDIR LOCALIDAD
   ========================================================== */

.pedir-localidad {
    align-items: center;
    text-align: center;
}

.pedir-localidad p {
    font-size: 18px;
    font-weight: 400;
    color: #111827;
}


/* ==========================================================
   MENSAJES DE BÚSQUEDA
   ========================================================== */

.empty-detail.mensaje-generico h2 {
    font-size: 18px;
    font-weight: 400;
}

.empty-detail.pedir-localidad p {
    font-size: 18px;
    font-weight: 400;
}

