.oposaketak-notice {
    padding: 0.85rem 1rem;
    background: #f0f6fc;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
}

.oposaketak-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.55rem 1.1rem;
    border: 1px solid #2271b1;
    border-radius: 4px;
    background: #fff;
    color: #2271b1;
    text-decoration: none;
    font-size: 0.95rem;
    cursor: pointer;
}

.oposaketak-button--primary {
    background: #2271b1;
    color: #fff;
}

.oposaketak-button:hover,
.oposaketak-button:focus {
    opacity: 0.9;
}

/* Listado */

.oposaketak-listado__filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #f6f7f7;
    border-radius: 6px;
}

.oposaketak-listado__field label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.35rem;
}

.oposaketak-listado__field select,
.oposaketak-listado__field input[type="search"] {
    width: 100%;
    padding: 0.45rem 0.6rem;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
}

.oposaketak-listado__field--checkbox label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 400;
}

.oposaketak-listado__field--submit {
    display: flex;
    align-items: flex-end;
    gap: 0.5rem;
}

.oposaketak-listado__count {
    font-weight: 600;
    margin-bottom: 1rem;
}

.oposaketak-listado__items {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
    gap: 1.25rem;
}

.oposaketak-card {
    background: #fff;
    border: 1px solid #dcdcde;
    border-radius: 6px;
    padding: 1.1rem 1.25rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.oposaketak-card__title {
    margin: 0;
    font-size: 1.1rem;
    word-break: break-word;
}

.oposaketak-card__badges {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: 0;
    padding: 0;
}

.oposaketak-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    background: #edeff0;
    color: #1d2327;
    white-space: nowrap;
}

.oposaketak-card__meta {
    display: grid;
    gap: 0.5rem;
    margin: 0;
}

.oposaketak-card__meta dt {
    font-weight: 600;
    margin: 0;
}

.oposaketak-card__meta dd {
    margin: 0;
}

.oposaketak-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: auto;
}

.oposaketak-listado__pagination {
    margin-top: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.oposaketak-listado__pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.2rem;
    padding: 0.35rem 0.6rem;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    text-decoration: none;
    color: #2271b1;
}

.oposaketak-listado__pagination .page-numbers.current {
    background: #2271b1;
    color: #fff;
    border-color: #2271b1;
}

/* Ficha */

.oposaketak-ficha {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    max-width: 860px;
}

.oposaketak-ficha__header {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.oposaketak-ficha__title {
    margin: 0;
    word-break: break-word;
}

.oposaketak-ficha__meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.75rem;
    margin: 0;
    padding: 1rem;
    background: #f6f7f7;
    border-radius: 6px;
}

.oposaketak-ficha__meta dt {
    font-weight: 600;
    margin: 0 0 0.15rem;
}

.oposaketak-ficha__meta dd {
    margin: 0;
}

.oposaketak-ficha__section h3 {
    margin: 0 0 0.5rem;
}

.oposaketak-ficha__text {
    word-break: break-word;
}

.oposaketak-ficha__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.oposaketak-ficha__bulletin-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.oposaketak-card__bulletin-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

@media (max-width: 600px) {
    .oposaketak-ficha__bulletin-links,
    .oposaketak-card__bulletin-links {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }

    .oposaketak-ficha__bulletin-links .oposaketak-button,
    .oposaketak-card__bulletin-links .oposaketak-button {
        width: 100%;
    }
}

/* Modal */

.oposaketak-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.oposaketak-modal[hidden] {
    display: none;
}

.oposaketak-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
}

.oposaketak-modal__dialog {
    position: relative;
    background: #fff;
    border-radius: 6px;
    width: min(100%, 900px);
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.oposaketak-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.85rem 1.1rem;
    border-bottom: 1px solid #dcdcde;
}

.oposaketak-modal__title {
    margin: 0;
    font-size: 1.05rem;
    word-break: break-word;
}

.oposaketak-modal__close {
    background: none;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    color: #1d2327;
    padding: 0.2rem 0.5rem;
}

.oposaketak-modal__body {
    position: relative;
    flex: 1;
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f0f1;
}

.oposaketak-modal__status {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 1rem;
    text-align: center;
    background: #f0f0f1;
}

.oposaketak-modal__frame {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 60vh;
    border: 0;
    background: #fff;
}

.oposaketak-modal__footer {
    padding: 0.75rem 1.1rem;
    border-top: 1px solid #dcdcde;
    display: flex;
    justify-content: flex-end;
}

@media (max-width: 600px) {
    .oposaketak-listado__field--submit {
        flex-direction: column;
        align-items: stretch;
    }

    .oposaketak-card__actions {
        flex-direction: column;
        align-items: stretch;
    }

    .oposaketak-card__actions .oposaketak-button {
        width: 100%;
    }

    .oposaketak-ficha__actions {
        flex-direction: column;
        align-items: stretch;
    }

    .oposaketak-ficha__actions .oposaketak-button {
        width: 100%;
    }

    .oposaketak-modal__dialog {
        max-height: 95vh;
    }

    .oposaketak-modal__body,
    .oposaketak-modal__frame {
        min-height: 70vh;
    }
}
