/* Estilos para a página de processos públicos */

/* Hero Section com altura reduzida */
.hero-small {
    background-color: var(--primary-color);
    color: white;
    padding: 140px 0 60px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-small::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('assets/logo-watermark.svg');
    background-repeat: no-repeat;
    background-position: center right;
    background-size: contain;
    opacity: 0.1;
    z-index: 1;
}

.hero-small .hero-content {
    position: relative;
    z-index: 2;
}

.hero-small h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero-small p {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto;
}

/* Seção de Processos */
.processes-section {
    padding: 60px 0;
    background-color: #f9f9f9;
}

/* Filtros */
.filters-container {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.search-filter {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.search-filter .search-input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    background-color: white;
    color: var(--text-dark);
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.filter-group {
    flex: 1;
    min-width: 200px;
}

.filter-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: var(--text-color);
}

.filter-select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: white;
    font-size: 1rem;
}

/* Lista de Processos */
.processes-container {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.processes-list {
    min-height: 400px;
    position: relative;
}

.process-card {
    padding: 20px;
    border-bottom: 1px solid #eee;
    transition: background-color 0.3s;
    cursor: pointer;
}

.process-card:last-child {
    border-bottom: none;
}

.process-card:hover {
    background-color: #f5f5f5;
}

.process-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e9ecef;
}

.process-title-container {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    margin-right: 15px;
}

.process-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
    line-height: 1.3;
    flex: 1;
}

.attachment-indicator {
    color: #28a745;
    font-size: 1rem;
    opacity: 0.8;
    transition: all 0.2s ease;
}

.attachment-indicator:hover {
    opacity: 1;
    transform: scale(1.1);
}

.process-number {
    font-size: 0.9rem;
    color: #666;
}

.process-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.process-meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.process-meta-item i {
    color: var(--primary-color);
    width: 16px;
    text-align: center;
}

/* Estilos para descrição expandível */
.process-description {
    margin: 10px 0;
    line-height: 1.5;
}

.description-preview,
.description-full {
    color: #555;
    font-size: 0.95rem;
}

.expand-btn,
.collapse-btn {
    background: none;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    margin-left: 8px;
    padding: 2px 6px;
    border-radius: 3px;
    transition: background-color 0.2s;
}

.expand-btn:hover,
.collapse-btn:hover {
    background-color: rgba(74, 144, 226, 0.1);
    text-decoration: underline;
}

.expand-btn:focus,
.collapse-btn:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}
}

.process-description {
    color: #444;
    margin-bottom: 15px;
    line-height: 1.5;
    white-space: pre-line;
}

.process-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.process-clients {
    font-size: 0.9rem;
    color: #666;
}

.process-status {
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-active {
    background-color: #e3f2fd;
    color: #0d47a1;
}

.status-suspended {
    background-color: #fff8e1;
    color: #ff8f00;
}

.status-concluded {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.status-archived {
    background-color: #eeeeee;
    color: #616161;
}

.visibility-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

.visibility-public {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.visibility-restricted {
    background-color: #ffebee;
    color: #c62828;
}

/* Loading Spinner */
.loading-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: var(--primary-color);
}

.loading-spinner i {
    font-size: 3rem;
    margin-bottom: 10px;
}

/* Paginação */
.pagination {
    display: flex;
    justify-content: center;
    padding: 20px;
    gap: 5px;
}

.pagination-button {
    padding: 8px 12px;
    border: 1px solid #ddd;
    background-color: white;
    color: var(--primary-color);
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s;
}

.pagination-button:hover {
    background-color: #f0f0f0;
}

.pagination-button.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.pagination-button.disabled {
    color: #ccc;
    cursor: not-allowed;
}

/* Modal de Detalhes */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    width: 80%;
    max-width: 900px;
    animation: modalFadeIn 0.3s;
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal-header {
    padding: 20px;
    background-color: var(--primary-color);
    color: white;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
}

.close-modal {
    color: white;
    font-size: 1.8rem;
    font-weight: bold;
    cursor: pointer;
}

.modal-body {
    padding: 20px;
    max-height: 70vh;
    overflow-y: auto;
}

.modal-footer {
    padding: 15px 20px;
    background-color: #f5f5f5;
    text-align: right;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
}

/* Detalhes do Processo no Modal */
.process-detail-section {
    margin-bottom: 25px;
}

.process-detail-section h3 {
    color: var(--primary-color);
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-top: 0;
}

.process-detail-section p {
    white-space: pre-line;
    line-height: 1.6;
    color: #555;
}

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

.detail-item {
    margin-bottom: 15px;
}

.detail-label {
    font-weight: 600;
    color: #555;
    margin-bottom: 5px;
    display: block;
}

.detail-value {
    color: #333;
}

.clients-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.clients-list li {
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.clients-list li:last-child {
    border-bottom: none;
}

.client-role {
    font-size: 0.9rem;
    color: #666;
    margin-left: 10px;
}

/* Formulário de Login */
.login-form {
    max-width: 400px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

/* Botões */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.3s;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

/* Estilos para Anexos na Página Pública */
.attachments-container {
    margin-top: 15px;
}

.loading-attachments {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 20px;
    color: var(--primary-color);
    font-style: italic;
}

.loading-attachments i {
    font-size: 1.2rem;
}

.no-attachments {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 4px;
    border: 1px dashed #ddd;
}

.attachment-item-public {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.attachment-item-public:hover {
    background-color: #e9ecef;
    border-color: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.attachment-item-public:last-child {
    margin-bottom: 0;
}

.attachment-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #dc3545;
    color: white;
    border-radius: 6px;
    font-size: 1.2rem;
}

.attachment-info {
    flex: 1;
    min-width: 0;
}

.attachment-name {
    margin: 0 0 5px 0;
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    word-break: break-word;
}

.attachment-meta {
    display: flex;
    gap: 15px;
    font-size: 0.85rem;
    color: #666;
}

.attachment-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.attachment-meta i {
    font-size: 0.8rem;
    opacity: 0.7;
}

.attachment-actions {
    flex-shrink: 0;
    display: flex;
    gap: 8px;
}

.attachment-view,
.attachment-download {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    font-size: 0.9rem;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.attachment-view {
    background-color: #6c757d;
    color: white;
}

.attachment-view:hover {
    background-color: #5a6268;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.attachment-download:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.attachment-download i {
    font-size: 0.85rem;
}

/* Responsividade */
@media (max-width: 768px) {
    .filter-row {
        flex-direction: column;
        gap: 15px;
    }
    
    .process-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .process-number {
        margin-top: 5px;
    }
    
    .process-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
    
    .detail-grid {
        grid-template-columns: 1fr;
    }
    
    .attachment-item-public {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .attachment-meta {
        flex-direction: column;
        gap: 5px;
    }
    
    .attachment-actions {
        width: 100%;
    }
    
    .attachment-download {
        width: 100%;
        justify-content: center;
    }
}