/* Estilos para colecciones */
.dspace-collections {
    margin: 20px 0;
}

.dspace-collections.layout-list .dspace-collection {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.dspace-collections.layout-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.dspace-collection-title {
    margin-bottom: 10px;
}

.dspace-collection-description {
    color: #666;
    margin-bottom: 10px;
}

/* Estilos para ítems */
.dspace-items {
    margin-top: 15px;
}

.dspace-items.layout-list .dspace-item {
    margin-bottom: 15px;
    padding: 15px;
    background: #f9f9f9;
    border-left: 3px solid #0073aa;
}

.dspace-items.layout-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}

.dspace-item-title {
    margin: 0 0 10px 0;
}

.dspace-item-metadata {
    font-size: 0.9em;
    margin-bottom: 10px;
}

.dspace-metadata-field {
    margin-bottom: 5px;
}

.dspace-item-link {
    display: inline-block;
    padding: 5px 10px;
    background: #0073aa;
    color: white;
    text-decoration: none;
    border-radius: 3px;
    font-size: 0.9em;
}

.dspace-item-link:hover {
    background: #005177;
}

/* Mensajes de error */
.dspace-error {
    color: #dc3232;
    padding: 10px;
    background: #f7f7f7;
    border-left: 3px solid #dc3232;
}

/* Paginación */
.dspace-pagination {
    margin-top: 20px;
    display: flex;
    gap: 5px;
}

.dspace-pagination a {
    display: inline-block;
    padding: 5px 10px;
    background: #f0f0f0;
    text-decoration: none;
}

.dspace-pagination a:hover {
    background: #ddd;
}

/* Estilos para el contenedor de filtros */
.dspace-filter-container {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
}

.dspace-collection-filters {
    flex: 0 0 250px;
    background: #f9f9f9;
    padding: 20px;
    border-radius: 5px;
}

.dspace-collection-filters h3 {
    margin-top: 0;
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
}

.dspace-collection-list ul {
    list-style: none;
    padding-left: 0;
}

.dspace-collection-list li {
    margin-bottom: 8px;
}

.dspace-collection-list label {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.dspace-collection-list input[type="checkbox"] {
    margin-right: 10px;
}

.dspace-item-count {
    margin-left: auto;
    font-size: 0.8em;
    color: #666;
}

.dspace-apply-filters {
    margin-top: 15px;
    padding: 8px 15px;
    background: #0073aa;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
}

.dspace-apply-filters:hover {
    background: #005177;
}

/* Estilos para búsqueda */
.dspace-search-filter {
    flex: 1;
    margin-bottom: 20px;
}

.dspace-search-filter h3 {
    margin-top: 0;
}

.dspace-search-input {
    width: 70%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 3px;
}

.dspace-search-button {
    padding: 8px 15px;
    background: #0073aa;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
}

.dspace-search-button:hover {
    background: #005177;
}

/* Resultados */
.dspace-items-results {
    flex: 1;
    min-width: 0;
}

.dspace-loading {
    padding: 20px;
    text-align: center;
    font-style: italic;
    color: #666;
}

.dspace-no-items {
    padding: 20px;
    text-align: center;
    color: #666;
}

/* Paginación */
.dspace-pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 30px;
}

.dspace-page-button {
    padding: 5px 10px;
    background: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 3px;
    cursor: pointer;
}

.dspace-page-button:hover {
    background: #ddd;
}

.dspace-page-button.active {
    background: #0073aa;
    color: white;
    border-color: #005177;
}
/* Añadir estos estilos adicionales */
.dspace-collection-list label {
    display: flex;
    align-items: center;
    padding: 8px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.dspace-collection-list label:hover {
    background-color: #f0f0f0;
}

.dspace-collection-list input[type="checkbox"] {
    margin-right: 10px;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

/* Mejorar el feedback visual durante la carga */
.dspace-loading {
    background-color: rgba(255, 255, 255, 0.8);
    padding: 20px;
    text-align: center;
    position: absolute;
    width: 100%;
    z-index: 10;
}

.dspace-items-results {
    position: relative;
    min-height: 200px;
}

/* Efecto de transición para los ítems */
.dspace-items-grid {
    transition: opacity 0.3s;
}

.dspace-items-grid.loading {
    opacity: 0.5;
    pointer-events: none;
}

/* Spinner de carga */
.dspace-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0, 115, 170, 0.3);
    border-radius: 50%;
    border-top-color: #0073aa;
    animation: dspace-spin 1s ease-in-out infinite;
    margin-right: 10px;
    vertical-align: middle;
}

@keyframes dspace-spin {
    to { transform: rotate(360deg); }
}

/* Mensaje cuando no hay filtros seleccionados */
.dspace-no-filters {
    padding: 20px;
    text-align: center;
    color: #666;
    font-style: italic;
}
/* Estilos para mensajes de error detallados */
.dspace-error-detailed {
    padding: 20px;
    background: #f8d7da;
    border-left: 4px solid #dc3545;
    color: #721c24;
    border-radius: 4px;
}

.dspace-error-detailed h4 {
    margin-top: 0;
    color: #721c24;
}

.error-code {
    font-family: monospace;
    background: #f1f1f1;
    padding: 2px 5px;
    border-radius: 3px;
    display: inline-block;
}

.dspace-error-troubleshoot {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #f5c6cb;
}

.dspace-error-troubleshoot h5 {
    margin-bottom: 10px;
    font-size: 1em;
}

.dspace-error-troubleshoot ul {
    margin-top: 5px;
    padding-left: 20px;
}

.dspace-error-troubleshoot li {
    margin-bottom: 5px;
}