:root {
  --mensa-accent-color: #007bff;
  --mensa-accent-hover: #3399ff;
  --mensa-background-light: #f8f8f8;
  --mensa-border-light: #ccc;
  --mensa-success-dark: #28a745;
  --mensa-error-dark: #dc3545;
  --mensa-warning-dark: #ffc107;
  --mensa-text-dark: #333;
  --mensa-text-light: #fff;
  --mensa-card-background: #fff;
  --mensa-shadow-light: rgba(0, 0, 0, 0.1);
}

.rating-form-component * {
  box-sizing: border-box;
}

.rating-form-component body {
  font-family: Arial, sans-serif;
  background: var(--mensa-background-light);
  color: var(--mensa-text-dark);
}

.form-container {
  max-width: 500px;
  width: 90%;
  margin: 50px auto;
  padding: 20px;
  background: var(--mensa-card-background);
  border-radius: 10px;
  box-shadow: 0 4px 10px var(--mensa-shadow-light);
}

@media (max-width: 600px) {
  .form-container {
    margin: 0;
    width: 100%;
    border-radius: 0;
    box-shadow: none;
  }
}

.rating-form-component .form-group {
  display: flex !important;
  flex-direction: column !important;
  margin-bottom: 15px !important;
}

.rating-form-component .form-group.yesno-group {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  margin-bottom: 15px !important;
  width: 100% !important;
  flex-wrap: nowrap !important;
}

.rating-form-component .form-group.yesno-group .question {
  flex: 1 !important;
  margin-bottom: 0 !important;
  margin-right: 15px !important;
  display: inline-block !important;
  font-weight: normal !important;
  line-height: 1.2 !important;
}

.rating-form-component .radio-buttons {
  display: flex !important;
  flex-shrink: 0 !important;
  gap: 0 !important;
}

.rating-form-component label.inline-radio {
  font-weight: normal !important;
  margin: 0 !important;
  display: inline-block !important;
  padding: 8px 15px !important;
  border: 1px solid var(--mensa-border-light) !important;
  cursor: pointer !important;
  transition: background-color 0.2s ease, border-color 0.2s ease,
    color 0.2s ease !important;
  white-space: nowrap !important;
  background: white !important;
}

.rating-form-component input[type='radio'][value='1'] + label.inline-radio {
  border-top-left-radius: 5px !important;
  border-bottom-left-radius: 5px !important;
  border-right: none !important;
}

.rating-form-component input[type='radio'][value='0'] + label.inline-radio {
  border-top-right-radius: 5px !important;
  border-bottom-right-radius: 5px !important;
}

.rating-form-component input[type='radio'] {
  display: none !important;
}

.rating-form-component input[type='radio']:checked + label.inline-radio {
  color: var(--mensa-text-light) !important;
}

.rating-form-component input[type='radio'][value='1']:checked + label.inline-radio {
  background-color: var(--mensa-success-dark) !important;
  border-color: var(--mensa-success-dark) !important;
}

.rating-form-component input[type='radio'][value='0']:checked + label.inline-radio {
  background-color: var(--mensa-error-dark) !important;
  border-color: var(--mensa-error-dark) !important;
}

.rating-form-component select,
.rating-form-component textarea,
.rating-form-component button,
.rating-form-component input[type='range'] {
  width: 100%;
  padding: 10px;
  margin-top: 5px;
  border: 0px solid var(--mensa-border-light);
}

.rating-form-component select {
  border-radius: 12px !important;
  border: 1px solid var(--mensa-border-light) !important;
}

.rating-form-component input[type='range']::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  outline: none;
  cursor: pointer;
}

.rating-form-component input[type='range']::-moz-range-thumb {
  width: 16px;
  height: 16px;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  outline: none;
  cursor: pointer;
}

.rating-form-component textarea {
  resize: none !important;
  border: 2px solid var(--mensa-accent-color) !important;
  border-radius: 8px !important;
}

.rating-form-component .submit-btn {
  background: var(--mensa-accent-color) !important;
  color: var(--mensa-text-light) !important;
  border: none !important;
  cursor: pointer !important;
  font-size: 16px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 5px !important;
  transition: background 0.3s ease, transform 0.1s ease !important;
  padding: 10px 15px !important;
  border-radius: 8px !important;
  width: 100% !important;
}

.rating-form-component .submit-btn:hover {
  background: var(--mensa-accent-hover) !important;
}

.rating-form-component .submit-btn:active {
  transform: translateY(1px) !important;
}

.rating-form-component .submit-btn:focus {
  outline: none !important;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.5) !important;
}

.rating-form-component .submit-btn i {
  font-size: 1.2em !important;
}

.rating-form-component .slider-container {
  width: 100%;
  text-align: center;
  position: relative;
  margin-top: 10px;
}

.rating-form-component #points {
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  height: 20px;
  border-radius: 10px;
  outline: none;
  cursor: pointer;
  position: relative;
  z-index: 10;
  margin-bottom: 5px;
}

.rating-form-component #points::-webkit-slider-thumb,
.rating-form-component #points::-moz-range-thumb {
  width: 16px;
  height: 16px;
  background: transparent;
  opacity: 0;
  cursor: pointer;
}

.rating-form-component #emoji-container {
  display: flex;
  justify-content: space-between;
  position: absolute;
  width: 100%;
  top: -10px;
  pointer-events: none;
}

.rating-form-component .emoji {
  font-size: 2rem;
  transition: opacity 0.2s, transform 0.2s;
  opacity: 0.3;
  cursor: pointer;
}

.rating-form-component .emoji.active {
  opacity: 1;
  transform: scale(1.3);
}

.rating-form-component #rating-text {
  margin-top: 2px;
  text-align: center;
  font-weight: bold;
}

.rating-form-component #rating-value {
  margin: 5px 0 0 0;
  text-align: center;
}

.rating-form-component #rating-value span {
  font-size: 1.2rem;
  color: var(--mensa-accent-color);
}