/**
 * @file
 * Styles for DGA Feedback Widget
 */

.feedback-widget {
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding: 24px;

}

.fw-row-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.fw-status {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
}

.fw-status-icon {
  color: #28a745;
  font-size: 1.5rem;
}

.fw-status-text {
  margin: 0;
  font-weight: 500;
  font-size: 1.1rem;
}

.fw-actions {
  display: flex;
  gap: 0.5rem;
}

.fw-btn {
  display: flex;
  height: 2.5rem;
  min-height: 2.5rem;
  max-height: 2.5rem;
  padding: var(--Global-spacing-none, 0) var(--Button-buttons-lg-padding, 1rem);
  justify-content: center;
  align-items: center;
  gap: var(--Button-buttons-lg-gap, 0.25rem);
  border-radius: var(--Radius-radius-sm, 0.25rem);
  ;
  font-size: var(--Size-Text-typo-size-text-md, 1rem);
  font-style: normal;
  font-weight: 500;
  line-height: var(--Line-Height-Text-line-heights-text-md, 1.5rem);
}

.fw-btn-primary {
  background: var(--Button-button-background-primary-default, #1B8354);
  color: var(--Text-text-oncolor-primary, #FFF)
}



.fw-btn-subtle {
  background-color: transparent;
  color: #161616;
  border: 1px solid #d2d6db;
}

.fw-btn-subtle:hover {
  background-color: #f5f5f5;
}

.fw-stats {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.fw-small {
  margin: 0;
  font-size: 0.9rem;
  color: #666;
}

.fw-questions {
  padding-top: 1.5rem;
}

.fw-reasons {
  margin-bottom: 1.5rem;
}

.fw-title {
  margin: 0 0 1rem 0;
  font-size: 1.1rem;
  font-weight: 600;
}

.fw-title-inline {
  display: inline;
  margin-right: 1rem;
  font-size: 1.1rem;
  font-weight: 600;
}

.fw-muted {
  color: #666;
  font-weight: normal;
}

.fw-required {
  color: #dc3545;
  font-weight: bold;
  margin-left: 0.25rem;
}

.fw-reasons-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.fw-checkbox {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.fw-checkbox input[type="checkbox"] {
  width: 1.2rem;
  height: 1.2rem;
  cursor: pointer;
}

.fw-textarea {
  margin-bottom: 1.5rem;
}

.fw-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.fw-textarea-input {
  display: flex;
  padding: 1rem;
  align-items: center;
  gap: .25rem;
  flex: 1 0 0;
  align-self: stretch;
  border-radius: .25rem;
  border: 1px solid #9da4ae;
  background: #FFF;
  width: 100%;

}

.fw-textarea-input:focus {
    outline: none;
    box-shadow: 0px 4px 8px -2px rgba(16, 24, 40, 0.1), 0px 2px 4px -2px rgba(16, 24, 40, 0.06), 0 2px 0 #1b8354;

}

.fw-gender {
  margin-bottom: 1.5rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
}

.fw-radio {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.fw-radio input[type="radio"] {
  width: 1.2rem;
  height: 1.2rem;
  cursor: pointer;
}

.fw-submit-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
}

.fw-info {
  margin: 0;
  font-size: 0.9rem;
  color:#384250;
}

/* Error messages */
.feedback-widget .fw-error-message {
  color: #dc3545;
  font-weight: bold;
  font-size: 0.9em;
  margin-left: 8px;
  display: inline-block;
}

.feedback-widget .fw-title .fw-error-message,
.feedback-widget .fw-title-inline .fw-error-message,
.feedback-widget .fw-label .fw-error-message {
  color: #dc3545;
  font-weight: bold;
}

/* Error styling for form fields */
.feedback-widget .fw-textarea-input.error,
.feedback-widget .fw-textarea-input:invalid {
  border-color: #dc2626;
  border-left-width: 3px;
  border-left-color: #dc2626;
  background-color: #fef2f2;
  animation: shake 0.3s ease-in-out;
}

.feedback-widget .fw-reasons.error,
.feedback-widget .fw-gender.error {
  border: 2px solid #dc3545;
  padding: 0.5rem;
  border-radius: 4px;
  background-color: #fff5f5;
}

.feedback-widget .fw-actions.error {
  border: 2px solid #dc3545;
  padding: 0.5rem;
  border-radius: 4px;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

/* Responsive */
@media (max-width: 768px) {
  .fw-row-top {
    flex-direction: column;
    align-items: flex-start;
  }

  .fw-stats {
    width: 100%;
    justify-content: space-between;
  }

  .fw-submit-row {
    flex-direction: column;
    align-items: flex-start;
  }
}
