/**
 * Quadro de Vagas Kombo - Estilos do Frontend
 *
 * Variaveis de cores (Identidade ValorH):
 * - Primary: #8B1818 (burgundy red)
 * - White: #FFFFFF
 * - Text: #333333
 * - Secondary text: #666666
 *
 * @package Quadro_Vagas_Kombo
 * @since 1.0.0
 */

/* === WRAPPER === */
.kombo-vagas-wrapper {
    width: 100%;
    box-sizing: border-box;
}

.kombo-vagas-wrapper *,
.kombo-vagas-wrapper *::before,
.kombo-vagas-wrapper *::after {
    box-sizing: border-box;
}

/* === LAYOUT GRID === */
.kombo-vagas-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

/* Grid responsivo - tablet */
@media (max-width: 1024px) {
    .kombo-vagas-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Grid responsivo - mobile */
@media (max-width: 768px) {
    .kombo-vagas-grid {
        grid-template-columns: 1fr;
    }
}

/* === ESTILOS DO CARD === */
.kombo-vaga-card {
    background-color: #FFFFFF;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
}

.kombo-vaga-card.kombo-card-hover:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* === TITULO === */
.kombo-vaga-title {
    color: #8B1818;
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0 0 12px 0;
    line-height: 1.3;
}

/* === INFORMACOES === */
.kombo-vaga-info-wrapper {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
    flex-grow: 1;
}

.kombo-vaga-info-inline {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 12px;
}

.kombo-vaga-info {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #666666;
    font-size: 0.875rem;
    line-height: 1.4;
}

.kombo-info-icon {
    font-size: 1rem;
    line-height: 1;
    color: #8B1818;
}

/* Classe para leitores de tela */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* === BOTAO === */
.kombo-vaga-button {
    display: inline-block;
    background-color: #8B1818;
    color: #FFFFFF;
    padding: 10px 20px;
    border-radius: 4px;
    text-decoration: none;
    text-align: center;
    font-weight: 500;
    font-size: 0.9375rem;
    transition: background-color 0.2s ease, transform 0.1s ease;
    margin-top: auto;
    border: none;
    cursor: pointer;
}

.kombo-vaga-button:hover,
.kombo-vaga-button:focus {
    background-color: #6B0F0F;
    color: #FFFFFF;
    text-decoration: none;
}

.kombo-vaga-button:focus {
    outline: 2px solid #8B1818;
    outline-offset: 2px;
}

.kombo-vaga-button:active {
    transform: scale(0.98);
}

/* === LAYOUT LISTA === */
.kombo-vagas-lista {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.kombo-vaga-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #FFFFFF;
    border-radius: 8px;
    padding: 16px 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    gap: 20px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.kombo-vaga-item:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.kombo-vaga-item .kombo-vaga-content {
    flex: 1;
    min-width: 0;
}

.kombo-vaga-item .kombo-vaga-title {
    margin-bottom: 8px;
}

.kombo-vaga-item .kombo-vaga-info-wrapper {
    margin-bottom: 0;
}

.kombo-vaga-item .kombo-vaga-action {
    flex-shrink: 0;
}

/* Lista responsiva */
@media (max-width: 768px) {
    .kombo-vaga-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .kombo-vaga-item .kombo-vaga-action {
        width: 100%;
        margin-top: 12px;
    }

    .kombo-vaga-item .kombo-vaga-button {
        width: 100%;
        display: block;
    }
}

/* === LAYOUT ACCORDION === */
.kombo-vagas-accordion {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.kombo-accordion-item {
    background-color: #FFFFFF;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.kombo-accordion-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    transition: background-color 0.2s ease;
}

.kombo-accordion-header:hover {
    background-color: #f5f5f5;
}

.kombo-accordion-header:focus {
    outline: none;
    box-shadow: inset 0 0 0 2px #8B1818;
}

.kombo-accordion-header .kombo-vaga-title {
    margin: 0;
    flex: 1;
}

.kombo-accordion-icon {
    width: 24px;
    height: 24px;
    position: relative;
    flex-shrink: 0;
    margin-left: 12px;
}

.kombo-accordion-icon::before,
.kombo-accordion-icon::after {
    content: '';
    position: absolute;
    background-color: #8B1818;
    transition: transform 0.2s ease;
}

.kombo-accordion-icon::before {
    width: 2px;
    height: 12px;
    top: 6px;
    left: 11px;
}

.kombo-accordion-icon::after {
    width: 12px;
    height: 2px;
    top: 11px;
    left: 6px;
}

.kombo-accordion-header[aria-expanded="true"] .kombo-accordion-icon::before {
    transform: rotate(90deg);
}

.kombo-accordion-panel {
    padding: 0 20px 20px;
    animation: kombo-accordion-open 0.2s ease;
}

@keyframes kombo-accordion-open {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.kombo-accordion-panel[hidden] {
    display: none;
}

.kombo-accordion-panel .kombo-vaga-info-wrapper {
    border-top: 1px solid #eee;
    padding-top: 16px;
}

.kombo-vaga-description {
    color: #333333;
    font-size: 0.9375rem;
    line-height: 1.6;
    margin: 16px 0;
}

.kombo-vaga-description p {
    margin: 0 0 8px 0;
}

.kombo-vaga-description p:last-child {
    margin-bottom: 0;
}

/* === FILTROS INTERATIVOS === */
.kombo-filters-wrapper {
    background-color: #F5F5F5;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 24px;
    border: 1px solid #E5E5E5;
}

.kombo-filters-container {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    align-items: flex-end;
    margin-bottom: 12px;
}

.kombo-filter-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
    min-width: 200px;
}

.kombo-filter-field label {
    color: #333333;
    font-size: 0.875rem;
    font-weight: 500;
    margin: 0;
}

.kombo-filter-input,
.kombo-filter-location,
.kombo-filter-area {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #CCCCCC;
    border-radius: 4px;
    font-size: 0.9375rem;
    font-family: inherit;
    color: #333333;
    background-color: #FFFFFF;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.kombo-filter-input:hover,
.kombo-filter-location:hover,
.kombo-filter-area:hover {
    border-color: #8B1818;
}

.kombo-filter-input:focus,
.kombo-filter-location:focus,
.kombo-filter-area:focus {
    outline: none;
    border-color: #8B1818;
    box-shadow: 0 0 0 3px rgba(139, 24, 24, 0.1);
}

.kombo-filter-reset {
    background-color: #8B1818;
    color: #FFFFFF;
    border: none;
    border-radius: 4px;
    padding: 10px 20px;
    font-size: 0.9375rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
    white-space: nowrap;
}

.kombo-filter-reset:hover {
    background-color: #6B0F0F;
}

.kombo-filter-reset:focus {
    outline: 2px solid #8B1818;
    outline-offset: 2px;
}

.kombo-filter-reset:active {
    transform: scale(0.98);
}

.kombo-filter-results {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid #E5E5E5;
}

.kombo-filter-count {
    color: #666666;
    font-size: 0.875rem;
    font-weight: 500;
}

/* Itens filtrados (escondidos) */
.kombo-vaga-card[hidden],
.kombo-vaga-item[hidden],
.kombo-accordion-item[hidden] {
    display: none;
}

.kombo-vaga-card[aria-hidden="true"],
.kombo-vaga-item[aria-hidden="true"],
.kombo-accordion-item[aria-hidden="true"] {
    display: none;
}

/* Filtros responsivos */
@media (max-width: 768px) {
    .kombo-filters-container {
        flex-direction: column;
        align-items: stretch;
    }

    .kombo-filter-field {
        min-width: 100%;
    }

    .kombo-filter-reset {
        width: 100%;
    }

    .kombo-filter-results {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }
}

/* === ESTADOS DE ERRO E VAZIO === */
.kombo-vagas-error,
.kombo-vagas-empty {
    background-color: #f8f8f8;
    border-radius: 8px;
    padding: 24px;
    text-align: center;
}

.kombo-vagas-error {
    background-color: #fff5f5;
    border: 1px solid #fecaca;
}

.kombo-vagas-error p,
.kombo-vagas-empty p {
    margin: 0;
    color: #666666;
    font-size: 0.9375rem;
}

.kombo-vagas-error p {
    color: #991b1b;
}

/* === ESTILOS DE FOCO ACESSIVEIS === */
.kombo-vaga-card:focus-within,
.kombo-vaga-item:focus-within,
.kombo-accordion-item:focus-within {
    outline: 2px solid #8B1818;
    outline-offset: 2px;
}

/* === ESTILOS DE IMPRESSAO === */
@media print {
    .kombo-vaga-button {
        display: none;
    }

    .kombo-vaga-card,
    .kombo-vaga-item,
    .kombo-accordion-item {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }

    .kombo-vagas-grid {
        display: block;
    }

    .kombo-vaga-card {
        margin-bottom: 16px;
    }

    .kombo-accordion-panel {
        display: block !important;
    }

    .kombo-accordion-panel[hidden] {
        display: block !important;
    }
}

/* === LAYOUT SIDEBAR === */
.kombo-layout-sidebar .kombo-sidebar-layout-flex {
    display: flex;
    gap: 20px;
}

.kombo-layout-sidebar .kombo-filters-wrapper {
    flex: 0 0 25%; /* Largura padrão 25% */
    width: 25%;
    margin-bottom: 0;
    height: fit-content;
    position: sticky;
    top: 20px;
}

.kombo-layout-sidebar .kombo-content-wrapper {
    flex: 1;
    width: 75%;
}

/* Sidebar responsivo */
@media (max-width: 1024px) {
    .kombo-layout-sidebar .kombo-sidebar-layout-flex {
        flex-direction: column;
    }

    .kombo-layout-sidebar .kombo-filters-wrapper {
        flex: 0 0 auto;
        width: 100%;
        position: relative;
        top: auto;
    }

    .kombo-layout-sidebar .kombo-content-wrapper {
        width: 100%;
    }
}

/* === FEEDBACK VISUAL === */

/* Loading spinner */
.kombo-filter-loading {
    display: none;
    align-items: center;
    justify-content: center;
    padding: 10px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.9);
    border-radius: 4px;
    z-index: 10;
}

.kombo-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #8B1818;
    border-radius: 50%;
    animation: kombo-spin 0.8s linear infinite;
}

@keyframes kombo-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Empty state message */
.kombo-filter-empty {
    display: none;
    padding: 24px;
    text-align: center;
    background-color: #FFF9E6;
    border: 1px solid #FFE0A3;
    border-radius: 8px;
    margin-top: 20px;
}

.kombo-filter-empty p {
    margin: 0;
    color: #8B6914;
    font-size: 0.9375rem;
}

/* Active input highlight */
.kombo-filter-input.kombo-filter-active {
    border-color: #8B1818;
    box-shadow: 0 0 0 3px rgba(139, 24, 24, 0.1);
}

/* Fade animations */
.kombo-vaga-card,
.kombo-vaga-item,
.kombo-accordion-item {
    transition: opacity 0.3s ease;
}

.kombo-vaga-card[hidden],
.kombo-vaga-item[hidden],
.kombo-accordion-item[hidden] {
    opacity: 0;
}

/* === MOBILE COLLAPSE TOGGLE === */
.kombo-filter-toggle {
    display: none;
    width: 100%;
    padding: 12px 16px;
    background-color: #8B1818;
    color: #FFFFFF;
    border: none;
    border-radius: 4px;
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    text-align: left;
    margin-bottom: 12px;
    transition: background-color 0.2s ease;
    position: relative;
}

.kombo-filter-toggle:hover {
    background-color: #6B0F0F;
}

.kombo-filter-toggle-icon {
    float: right;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid #FFFFFF;
    transition: transform 0.2s ease;
    margin-top: 7px;
}

.kombo-filter-toggle.kombo-filter-toggle-open .kombo-filter-toggle-icon {
    transform: rotate(180deg);
}

@media (max-width: 768px) {
    .kombo-filters-wrapper[data-mobile-collapse="true"] .kombo-filter-toggle {
        display: block;
    }

    .kombo-filters-wrapper[data-mobile-collapse="true"] .kombo-filters-container {
        display: none;
    }
}

/* === MOBILE ORDER === */
@media (max-width: 768px) {
    .kombo-vagas-wrapper {
        display: flex;
        flex-direction: column;
    }

    /* Filtros depois do grid */
    .kombo-filters-wrapper[data-mobile-order="after"] {
        order: 2;
    }

    .kombo-filters-wrapper[data-mobile-order="after"] ~ .kombo-vagas-grid,
    .kombo-filters-wrapper[data-mobile-order="after"] ~ .kombo-vagas-lista,
    .kombo-filters-wrapper[data-mobile-order="after"] ~ .kombo-vagas-accordion,
    .kombo-filters-wrapper[data-mobile-order="after"] ~ .kombo-sidebar-layout-flex {
        order: 1;
    }
}

/* === REDUCAO DE MOVIMENTO === */
@media (prefers-reduced-motion: reduce) {
    .kombo-vaga-card,
    .kombo-vaga-item,
    .kombo-vaga-button,
    .kombo-accordion-header,
    .kombo-accordion-icon::before,
    .kombo-accordion-icon::after,
    .kombo-accordion-panel,
    .kombo-spinner,
    .kombo-filter-toggle-icon {
        transition: none;
        animation: none;
    }
}

/* === WIDGET BOTAO CURRICULO === */
.kombo-curriculo-wrapper {
    display: block;
}

.kombo-curriculo-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
}

.kombo-curriculo-btn:hover,
.kombo-curriculo-btn:focus {
    text-decoration: none;
}

.kombo-curriculo-icon-antes,
.kombo-curriculo-icon-depois {
    display: inline-flex;
    align-items: center;
    line-height: 1;
}

/* === MODO ESCURO (se suportado pelo tema) === */
@media (prefers-color-scheme: dark) {
    /* Estilos de modo escuro podem ser adicionados aqui se necessario */
    /* Por enquanto, mantemos os estilos padrao que podem ser sobrescritos pelo Elementor */
}
