/* Estilos para el Modal de Descarga ERM Tool Kit */

.erm-modal {
	position: fixed;
	z-index: 9999;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	overflow: auto;
	background-color: rgba(0,0,0,0.5);
}

.erm-modal-content {
    background-color: #fff;
    margin: 10% auto;
    padding: 30px;
    border: 1px solid #939393;
    width: 90%;
    max-width: 600px;
    border-radius: 8px;
    position: relative;
    max-height: 80vh;
    overflow-y: auto;
}

.erm-modal-close {
    color: #939393;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 20px;
    top: 15px;
}

.erm-modal-close:hover,
.erm-modal-close:focus {
	color: #E2831F;
	text-decoration: none;
	cursor: pointer;
}

.erm-upload-container {
    background: #fff;
    padding: 20px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.erm-trigger-download,
#erm-confirm-download {
    background: #1A3B81;
    color: white;
    border: 2px solid #1A3B81;
    padding: 4px 10px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s ease;
    font-weight: 600;
}

.erm-view-details {
    background: transparent;
    color: #1A3B81;
    border: 2px solid #1A3B81;
    padding: 4px 10px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s ease;
    font-weight: 600;
}

.erm-trigger-download:hover,
#erm-confirm-download:hover {
    background: #E2831F;
    border-color: #E2831F;
}

.erm-view-details:hover {
    background: #1A3B81;
    color: white;
}

#erm-confirm-download:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Estilos para el Archivo (Buscador) */
.erm-archive-container {
    margin-top: 20px;
}

.erm-filters {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    border: 1px solid #ddd;
}

.erm-filters select,
.erm-filters button {
    padding: 8px;
    margin-right: 10px;
}

.erm-filters button {
    background: #1A3B81;
    color: white;
    border: none;
    cursor: pointer;
    border-radius: 3px;
    transition: background 0.2s ease;
}

.erm-filters button:hover {
    background: #E2831F;
}

.erm-group-title {
    margin-top: 30px;
    padding-bottom: 5px;
    border-bottom: 2px solid #E2831F;
    color: #2D2D2D;
}

.erm-document-list {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 15px;
}

.erm-document-list li {
    background: #fff;
    padding: 20px;
    margin-bottom: 0;
    border: 1px solid #eaeaea;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.erm-document-list li:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.1);
}

.erm-document-list li h4 {
    margin: 0 0 10px 0;
    color: #1A3B81;
    font-size: 1.1em;
    line-height: 1.3;
}

.erm-document-list li p {
    flex-grow: 1;
    color: #2D2D2D;
    font-size: 0.9em;
    margin-bottom: 12px;
}

.erm-keywords {
    font-size: 0.85em;
    color: #939393;
    margin-bottom: 15px;
    padding-top: 10px;
    border-top: 1px solid #f0f0f0;
}

.erm-list-actions {
    margin-top: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    justify-content: center;
}

.erm-list-actions button,
.erm-list-actions a {
    width: 100%;
    text-align: center;
    font-size: 0.85em;
    padding: 5px 10px;
    box-sizing: border-box;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#erm-pagination-container {
    margin-top: 20px;
    text-align: center;
}

#erm-pagination-container ul.page-numbers {
    list-style: none;
    padding: 0;
    display: inline-flex;
    gap: 5px;
}

#erm-pagination-container .page-numbers {
    padding: 5px 10px;
    border: 1px solid #939393;
    text-decoration: none;
    color: #2D2D2D;
    transition: all 0.2s ease;
}

#erm-pagination-container .page-numbers:hover {
    background: #f9f9f9;
    color: #E2831F;
    border-color: #E2831F;
}

#erm-pagination-container .page-numbers.current {
    background: #1A3B81;
    color: white;
    border-color: #1A3B81;
}
