/* Container principal */
.ouvidoria-search-container,
.ouvidoria-create-container {
  max-width: 800px;
  margin: 20px auto;
  padding: 20px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.ouvidoria-search-container h3,
.ouvidoria-create-container h3 {
  margin: 0 0 20px 0;
  color: #333;
  font-size: 24px;
  font-weight: 600;
  text-align: center;
}

/* Formulário */
.ouvidoria-search-form,
.ouvidoria-create-form {
  margin-bottom: 30px;
}

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

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #555;
}

.form-group input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e1e5e9;
  border-radius: 6px;
  font-size: 16px;
  transition: border-color 0.3s ease;
  box-sizing: border-box;
}

.form-group input:focus {
  outline: none;
  border-color: #007cba;
  box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

.btn-search {
  background: #007cba;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s ease;
  min-width: 120px;
}

.btn-search:hover:not(:disabled) {
  background: #005a87;
}

.btn-search:disabled {
  background: #ccc;
  cursor: not-allowed;
}

.btn-loading {
  display: none;
}

/* Botão de criação */
.btn-create {
  background: #28a745;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s ease;
  min-width: 120px;
}

.btn-create:hover:not(:disabled) {
  background: #218838;
}

.btn-create:disabled {
  background: #ccc;
  cursor: not-allowed;
}

/* Seções do formulário */
.form-section {
  margin-bottom: 30px;
  padding: 20px;
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
}

.form-section h4 {
  margin: 0 0 20px 0;
  color: #333;
  font-size: 18px;
  border-bottom: 2px solid #007cba;
  padding-bottom: 10px;
}

/* Campos de endereço */
.endereco-fields {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 6px;
  padding: 20px;
  margin-top: 15px;
}

.endereco-fields h4 {
  margin: 0 0 15px 0;
  color: #495057;
  font-size: 16px;
}

/* Radio buttons */
.form-group label input[type="radio"] {
  margin-right: 8px;
}

.form-group label {
  display: inline-block;
  margin-right: 20px;
  font-weight: normal;
  cursor: pointer;
}

/* Textarea */
textarea {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e1e5e9;
  border-radius: 6px;
  font-size: 16px;
  transition: border-color 0.3s ease;
  box-sizing: border-box;
  resize: vertical;
  min-height: 120px;
}

textarea:focus {
  outline: none;
  border-color: #007cba;
  box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

/* Select */
select {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e1e5e9;
  border-radius: 6px;
  font-size: 16px;
  transition: border-color 0.3s ease;
  box-sizing: border-box;
  background: white;
}

select:focus {
  outline: none;
  border-color: #007cba;
  box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

/* Checkbox */
input[type="checkbox"] {
  margin-right: 8px;
}

/* File inputs */
.file-input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e1e5e9;
  border-radius: 6px;
  font-size: 16px;
  transition: border-color 0.3s ease;
  box-sizing: border-box;
  background: white;
}

.file-input:focus {
  outline: none;
  border-color: #007cba;
  box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

.file-info {
  margin-top: 5px;
}

.file-info small {
  color: #666;
  font-size: 14px;
}

/* File preview */
.file-preview {
  margin-top: 10px;
  padding: 10px;
  background: #f8f9fa;
  border-radius: 4px;
  border: 1px solid #e9ecef;
}

.file-preview-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 0;
  border-bottom: 1px solid #e9ecef;
}

.file-preview-item:last-child {
  border-bottom: none;
}

.file-preview-name {
  font-size: 14px;
  color: #333;
}

.file-preview-size {
  font-size: 12px;
  color: #666;
}

.file-preview-remove {
  background: #dc3545;
  color: white;
  border: none;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 12px;
  cursor: pointer;
}

.file-preview-remove:hover {
  background: #c82333;
}

/* Feedback Form */
.feedback-form {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 20px;
  margin-top: 20px;
}

.ouvidoria-feedback-info {
  background: #fff3cd;
  border: 1px solid #ffeaa7;
  border-radius: 8px;
  padding: 20px;
  margin-top: 20px;
}

.ouvidoria-feedback-info h5 {
  margin: 0 0 10px 0;
  color: #856404;
  font-size: 16px;
}

.feedback-info-message p {
  margin: 0;
  color: #856404;
  font-size: 14px;
  line-height: 1.5;
}

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

.feedback-form label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  color: #333;
}

.rating-group {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}

.rating-group input[type="radio"] {
  display: none;
}

.rating-group label {
  display: inline-block;
  width: 40px;
  height: 40px;
  line-height: 40px;
  text-align: center;
  background: #e9ecef;
  border: 2px solid #e9ecef;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 600;
  color: #666;
  margin-bottom: 0;
}

.rating-group input[type="radio"]:checked+label {
  background: #007cba;
  border-color: #007cba;
  color: white;
}

.rating-group label:hover {
  background: #007cba;
  border-color: #007cba;
  color: white;
}

.feedback-form textarea {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e1e5e9;
  border-radius: 6px;
  font-size: 16px;
  transition: border-color 0.3s ease;
  box-sizing: border-box;
  resize: vertical;
  min-height: 100px;
}

.feedback-form textarea:focus {
  outline: none;
  border-color: #007cba;
  box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

.feedback-form input[type="checkbox"] {
  margin-right: 8px;
}

.feedback-form .form-actions {
  text-align: right;
  margin-top: 20px;
}

.feedback-success {
  background: #d4edda;
  border: 1px solid #c3e6cb;
  border-radius: 6px;
  padding: 20px;
  text-align: center;
}

.feedback-success h5 {
  color: #155724;
  margin-bottom: 10px;
}

.feedback-success p {
  color: #155724;
  margin: 0;
}

.feedback-error {
  background: #f8d7da;
  border: 1px solid #f5c6cb;
  border-radius: 6px;
  padding: 15px;
  margin-bottom: 20px;
}

.feedback-error .error-message {
  color: #721c24;
  font-weight: 500;
}



/* Sucesso do protocolo */
.protocolo-success {
  background: #d4edda;
  border: 1px solid #c3e6cb;
  border-radius: 8px;
  padding: 20px;
  margin-top: 20px;
}

.success-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  padding-bottom: 15px;
  border-bottom: 1px solid #c3e6cb;
}

.success-header h4 {
  margin: 0;
  color: #155724;
  font-size: 18px;
}

.protocolo-badge {
  background: #28a745;
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 16px;
}

.success-message p {
  color: #155724;
  margin: 0 0 15px 0;
  font-size: 16px;
}

.protocolo-actions {
  margin: 15px 0;
}

.btn-copy {
  background: #007cba;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.btn-copy:hover {
  background: #005a87;
}

.protocolo-info {
  background: #fff3cd;
  border: 1px solid #ffeaa7;
  border-radius: 4px;
  padding: 12px;
  margin-top: 15px;
}

.protocolo-info p {
  margin: 0;
  color: #856404;
  font-size: 14px;
}


/* Mensagens de erro */
.ouvidoria-error {
  margin-top: 20px;
}

.error-message {
  background: #f8d7da;
  color: #721c24;
  padding: 12px 16px;
  border-radius: 6px;
  border: 1px solid #f5c6cb;
}


/* Dados da ouvidoria */
.ouvidoria-data {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 20px;
  margin-top: 20px;
}

.ouvidoria-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 2px solid #e9ecef;
}

.ouvidoria-header h4 {
  margin: 0;
  color: #333;
  font-size: 20px;
}

.protocolo-badge {
  background: #007cba;
  color: white;
  padding: 6px 12px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 14px;
}

/* Informações da ouvidoria */
.ouvidoria-info {
  margin-bottom: 20px;
}

.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #e9ecef;
}

.info-row:last-child {
  border-bottom: none;
}

.info-row .label {
  font-weight: 600;
  color: #555;
  min-width: 150px;
}

.info-row .value {
  color: #333;
  text-align: right;
  flex: 1;
}

/* Status badges */
.status-respondida {
  background: #d4edda;
  color: #155724;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
}

.status-pendente {
  background: #fff3cd;
  color: #856404;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
}

.status-cancelada {
  background: #f8d7da;
  color: #721c24;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
}

/* Mensagens */
.ouvidoria-message,
.ouvidoria-response,
.ouvidoria-feedback {
  margin-bottom: 20px;
  padding: 15px;
  background: white;
  border-radius: 6px;
  border-left: 4px solid #007cba;
}

.ouvidoria-message h5,
.ouvidoria-response h5,
.ouvidoria-feedback h5 {
  margin: 0 0 10px 0;
  color: #333;
  font-size: 16px;
}

.message-content,
.response-content {
  color: #555;
  line-height: 1.6;
}

.response-date,
.feedback-date {
  margin-top: 10px;
  font-size: 12px;
  color: #888;
  font-style: italic;
}

/* Feedback */
.feedback-info {
  margin-top: 10px;
}

.feedback-comments {
  margin-top: 15px;
}

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

.comments-content {
  background: #f8f9fa;
  padding: 10px;
  border-radius: 4px;
  color: #333;
  line-height: 1.5;
}

/* Ratings */
.rating-1 {
  color: #dc3545;
}

.rating-2 {
  color: #fd7e14;
}

.rating-3 {
  color: #ffc107;
}

.rating-4 {
  color: #20c997;
}

.rating-5 {
  color: #28a745;
}

/* Anexos */
.ouvidoria-attachments {
  margin-bottom: 20px;
  padding: 15px;
  background: white;
  border-radius: 6px;
  border-left: 4px solid #6c757d;
}

.ouvidoria-attachments h5 {
  margin: 0 0 10px 0;
  color: #333;
  font-size: 16px;
}

.attachments-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.attachment-item {
  background: #e9ecef;
  padding: 8px 12px;
  border-radius: 4px;
  border: 1px solid #dee2e6;
}

.attachment-item a {
  color: #007cba;
  text-decoration: none;
  font-weight: 500;
}

.attachment-item a:hover {
  text-decoration: underline;
}

/* Responsividade */
@media (max-width: 768px) {
  .ouvidoria-search-container {
    margin: 10px;
    padding: 15px;
  }

  .ouvidoria-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .info-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
  }

  .info-row .label {
    min-width: auto;
  }

  .info-row .value {
    text-align: left;
  }

  .attachments-list {
    flex-direction: column;
  }
}

/* Animações */
.ouvidoria-results {
  animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}
