/* Previne comportamento de formulário */
#provas-filtro-form {
    pointer-events: auto !important;
}

#provas-filtro-form * {
    pointer-events: auto !important;
}

.provas-filtro-btn {
    pointer-events: auto !important;
    cursor: pointer !important;
}

.provas-filtro-btn:hover {
    pointer-events: auto !important;
}

/* Garante que os inputs não causem submissão */
#provas-filtro-form input[type="text"] {
    pointer-events: auto !important;
}

#provas-filtro-form input[type="hidden"] {
    pointer-events: none !important;
}

.provas-filtro-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff;
    border-radius: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
    gap: 0.5rem;
    max-width: 900px;
    margin: 2rem auto 1.5rem;
    font-family: inherit;
}

.provas-filtro-bar .provas-container-form {
    display: flex;
    align-items: center;
    padding: 2px 20px;
}

.provas-filtro-bar input[type="text"] {
    border: none;
    background: transparent;
    font-size: 1rem;
    padding: 0.7rem 1.2rem;
    border-radius: 1.5rem;
    outline: none;
    flex: 1 1 200px;
}

.provas-filtro-dropdown {
    position: relative;
    min-width: 120px;
    z-index: 100;
}

.provas-filtro-dropdown>button {
    background: none;
    border: none;
    font: inherit;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.4em;
    padding: 0.7rem 1.2rem;
    color: #000;
    cursor: pointer;
    position: relative;
    z-index: 101;
}

.provas-filtro-dropdown>button:hover,
.provas-filtro-dropdown>button:focus,
.provas-filtro-dropdown>button:focus-within {
    background-color: transparent !important;
    color: #000;
}

.provas-filtro-dropdown-list {
    display: none;
    position: absolute;
    top: 110%;
    left: 0;
    background: #fff;
    border-radius: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    min-width: 180px;
    z-index: 99;
    padding: 0.5rem 0;
    max-height: 250px;
    overflow-y: auto;
    border: 1px solid #e0e0e0;
    visibility: hidden;
    opacity: 0;
    transition: visibility 0.2s, opacity 0.2s;
}

.provas-filtro-dropdown-list.active {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    transform: translateY(0) !important;
}

/* Garante que o dropdown seja visível */
.provas-filtro-dropdown-list.active {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: absolute !important;
    z-index: 99 !important;
}

.provas-filtro-dropdown-list button {
    width: 100%;
    background: none;
    border: none;
    text-align: left;
    padding: 0.6rem 1.2rem;
    font: inherit;
    cursor: pointer;
    transition: background 0.2s;
    color: #000;
}

.provas-filtro-dropdown-list button:hover,
.provas-filtro-dropdown-list button.selected {
    background: #f5f5f5;
    color: #000;
}

.provas-filtro-bar .provas-filtro-btn {
    background: #a38a4e;
    color: #fff;
    border: none;
    border-radius: 1.5rem;
    font-weight: 700;
    padding: 0.8rem 2.2rem;
    margin-left: 0.5rem;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.07);
    transition: all 0.2s ease;
}

.provas-filtro-bar .provas-filtro-btn:hover {
    background: #8c753e;
}

.provas-filtro-bar .provas-filtro-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.7;
}

.provas-filtro-icon {
    margin-right: 0.5em;
    font-size: 1.1em;
    display: inline-block;
}

.provas-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin: 40px 0;
}

.prova-card {
    border-radius: 12px;
    overflow: hidden;
    background: #ffffff;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.10);
}

.prova-card-image {
    position: relative;
    height: 220px;
    overflow: hidden;
    border-bottom: 3px solid var(--e-global-color-accent);
}

.prova-card-image-link {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

.prova-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
}

.prova-card:hover .prova-card-image img {
    transform: scale(1.05);
}

.prova-card-content {
    padding: 25px 25px 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between !important;
    align-content: space-between !important;
    align-items: space-between !important;
}

.prova-card-title {
    margin: 0 0 15px;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.3;
    color: #343434;
}

.prova-card-title a {
    color: #343434;
    text-decoration: none;
    transition: all 0.25s ease;
}

.prova-card-title a:hover {
    color: var(--e-global-color-accent);
}

.prova-card-location {
    font-size: 16px;
    color: #343434;
    margin-bottom: 10px;
    font-weight: 500;
}

.prova-card-date {
    font-size: 18px;
    color: #343434;
    margin-bottom: 20px;
    font-weight: 700;
    text-transform: uppercase;
}

.prova-card-metrics {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 25px;
}

.prova-card-metric {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    color: #343434;
}

.prova-card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 18px;
}

.prova-card-icon svg {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.prova-card-value {
    font-weight: 600;
}

/* Estilos para provas encerradas */
.prova-card-encerrada {
    opacity: 0.75;
    position: relative;
}

.prova-card-encerrada::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.05);
    pointer-events: none;
    z-index: 1;
    border-radius: 12px;
}

.prova-card-date.prova-encerrada {
    color: #e74c3c;
    position: relative;
}

.prova-status-encerrada {
    display: block;
    color: #e74c3c;
    font-weight: 700;
    font-size: 14px;
    margin-top: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.prova-card-encerrada .prova-card-title a {
    color: #7f8c8d;
}

.prova-card-encerrada .prova-card-title a:hover {
    color: #95a5a6;
}

.prova-card-encerrada .prova-card-image {
    filter: grayscale(30%);
}

.provas-pagination {
    text-align: center;
    margin-top: 40px;
}

.provas-pagination .page-numbers {
    display: flex;
    padding: 8px 15px;
    margin: 0 3px;
    text-decoration: none;
    color: #333;
    font-weight: 500;
}

.provas-pagination .page-numbers li a {
    border-radius: 100% !important;
    border: 1px solid var(--e-global-color-secondary);
}

.provas-pagination li .current,
.provas-pagination li a:hover {
    background: var(--e-global-color-secondary);
    color: white;
    font-weight: 600;
}

.provas-pagination .page-numbers:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.provas-pagination ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
}

.provas-pagination li {
    margin: 0;
    padding: 0;
}

.provas-pagination .prev,
.provas-pagination .next {
    font-weight: 600;
    padding: 8px 16px !important;
}

.provas-pagination .dots {
    color: #999;
    cursor: default;
    border: none;
    background: transparent;
}

.provas-pagination .dots:hover {
    background: transparent !important;
    color: #999 !important;
    transform: none !important;
    box-shadow: none !important;
}

.provas-no-results {
    text-align: center;
    padding: 60px 20px;
    color: #7f8c8d;
    font-size: 18px;
}

.provas-reset-filters {
    color: var(--e-global-color-accent);
    text-decoration: none;
    font-weight: 600;
}

.provas-reset-filters:hover {
    text-decoration: underline;
}

.provas-loading,
.provas-error {
    text-align: center;
    padding: 60px 20px;
    color: #7f8c8d;
    font-size: 18px;
}

.provas-loading {
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px dashed #dee2e6;
    animation: pulse 1.5s ease-in-out infinite;
}

.provas-loading .loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e74c3c;
    border-top: 4px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

.provas-loading p {
    margin: 0;
    font-weight: 600;
    color: #2c3e50;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes pulse {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }

    100% {
        opacity: 1;
    }
}

@media (max-width: 700px) {
    .provas-filtro-bar {
        flex-wrap: wrap;
        gap: 0.5rem 0;
        padding: 0.5rem;
    }

    .provas-container-form {
        flex-wrap: wrap;
    }

    .provas-filtro-bar input[type="text"] {
        min-width: 120px;
    }

    .provas-filtro-bar .provas-filtro-btn {
        width: 100%;
        margin: 0.5rem 0 0;
    }

    .provas-cards-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .prova-card-content {
        padding: 20px 20px 0;
    }

    .prova-card-title {
        font-size: 20px;
    }
}

.inscricao-flag {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.inscricao-flag--open {
    background-color: #2ecc71;
    color: #fff;
}

.inscricao-flag--closed {
    background-color: #e74c3c;
    color: #fff;
}


