/* Report Widget CSS - Suporta configurações personalizadas */

#report-widget-container {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  color: #1f2937;
}

#report-widget-container * {
  box-sizing: border-box;
}

/* FAB - Floating Action Button */
#report-widget-container .rw-fab {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  position: fixed;
  min-width: 56px;
  height: 56px;
  padding: 0 16px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  z-index: 1055;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  font-weight: 500;
  font-size: 14px;
  white-space: nowrap;
}

#report-widget-container .rw-fab:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

#report-widget-container .rw-fab:active {
  transform: translateY(0);
}

/* Tamanhos */
#report-widget-container .rw-fab-sm {
  width: 48px;
  height: 48px;
  padding: 0 12px;
  font-size: 12px;
}

#report-widget-container .rw-fab-lg {
  width: 72px;
  height: 72px;
  padding: 0 20px;
  font-size: 16px;
}

/* Formatos */
#report-widget-container .rw-shape-rounded {
  border-radius: 12px;
}

#report-widget-container .rw-shape-square {
  border-radius: 0;
}

/* Posições */
#report-widget-container .rw-position-bottom-right {
  bottom: 20px;
  right: 20px;
}

#report-widget-container .rw-position-bottom-left {
  bottom: 20px;
  left: 20px;
}

#report-widget-container .rw-position-top-right {
  top: 20px;
  right: 20px;
}

#report-widget-container .rw-position-top-left {
  top: 20px;
  left: 20px;
}

#report-widget-container .rw-position-center-right {
  top: 50%;
  right: 20px;
  transform: translateY(-50%);
}

#report-widget-container .rw-position-center-left {
  top: 50%;
  left: 20px;
  transform: translateY(-50%);
}

/* SVG Icon */
#report-widget-container .rw-fab svg {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

#report-widget-container .rw-fab svg path {
  fill: currentColor;
  stroke: currentColor;
}

/* Modal */
#report-widget-container .modal {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1050;
  display: none;
  width: 100%;
  height: 100%;
  overflow: hidden;
  outline: 0;
}

#report-widget-container .modal.show {
  display: block;
}

#report-widget-container .modal-dialog {
  position: relative;
  width: auto;
  margin: 1rem;
  pointer-events: none;
  max-width: 500px;
}

#report-widget-container .modal-dialog-centered {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100% - 2rem);
}

#report-widget-container .modal-content {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  pointer-events: auto;
  background-color: #ffffff;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  border: none;
}

#report-widget-container .modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
  border-bottom: 1px solid #e5e7eb;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
}

#report-widget-container .modal-title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #111827;
}

#report-widget-container .modal-body {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  max-height: calc(100vh - 200px);
}

#report-widget-container .modal-footer {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding: 16px 20px;
  border-top: 1px solid #e5e7eb;
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
}

/* Backdrop */
#report-widget-container .modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1049;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.5);
  display: none;
}

#report-widget-container .modal-backdrop.show {
  display: block;
}

/* Form Elements */
#report-widget-container .mb-3 {
  margin-bottom: 16px;
}

#report-widget-container .form-label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
  font-size: 13px;
  color: #374151;
}

#report-widget-container .form-control {
  display: block;
  width: 100%;
  padding: 10px 12px;
  font-size: 14px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background-color: #ffffff;
  color: #1f2937;
  transition: border-color 0.2s;
}

#report-widget-container .form-control:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

#report-widget-container textarea.form-control {
  resize: vertical;
  min-height: 100px;
}

#report-widget-container .form-control[readonly] {
  background-color: #f9fafb;
  color: #6b7280;
}

/* Buttons */
#report-widget-container .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 500;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  min-height: 40px;
}

#report-widget-container .btn-primary {
  background-color: #3b82f6;
  color: #ffffff;
}

#report-widget-container .btn-primary:hover {
  background-color: #2563eb;
}

#report-widget-container .btn-secondary {
  background-color: #e5e7eb;
  color: #374151;
}

#report-widget-container .btn-secondary:hover {
  background-color: #d1d5db;
}

#report-widget-container .btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

#report-widget-container .btn-close {
  width: 24px;
  height: 24px;
  padding: 0;
  background: none;
  border: none;
  color: #6b7280;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
}

#report-widget-container .btn-close:hover {
  color: #1f2937;
}

/* Image Preview */
#report-widget-container .rw-image-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  background-color: #f9fafb;
}

#report-widget-container .rw-image-preview img {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 4px;
}

#report-widget-container .rw-image-preview-filename {
  flex: 1;
  font-size: 13px;
  color: #6b7280;
}

#report-widget-container .rw-hidden {
  display: none !important;
}

/* Spinner */
#report-widget-container .spinner-border {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spinner-border 0.75s linear infinite;
}

@keyframes spinner-border {
  to { transform: rotate(360deg); }
}

/* Utility Classes */
#report-widget-container .d-flex {
  display: flex;
}

#report-widget-container .align-items-center {
  align-items: center;
}

#report-widget-container .ms-2 {
  margin-left: 8px;
}

#report-widget-container .ms-auto {
  margin-left: auto;
}

#report-widget-container .mt-2 {
  margin-top: 8px;
}

#report-widget-container .row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

#report-widget-container .col-12 {
  width: 100%;
}

#report-widget-container .col-md-6 {
  width: 100%;
}

#report-widget-container .col-3 {
  width: calc(25% - 6px);
}

#report-widget-container .col-6 {
  width: calc(50% - 4px);
}

@media (min-width: 768px) {
  #report-widget-container .col-md-6 {
    width: calc(50% - 4px);
  }
  
  #report-widget-container .modal-dialog {
    margin: 1.75rem auto;
  }
}

@media (max-width: 480px) {
  #report-widget-container .modal-dialog {
    margin: 0.5rem;
  }
  
  #report-widget-container .modal-body {
    max-height: calc(100vh - 150px);
  }
}
