/* Survey Tab */
.survey-tab-container {
  position: fixed;
  z-index: 9999;
  top: 50%;
  transform: translateY(-50%);
  transition: opacity 0.3s ease;
  width: auto;
  padding: 0;
}

.survey-tab-container.position-right {
  right: 0;
}

.survey-tab-container.position-left {
  left: 0;
}

.survey-tab {
  padding: 12px 16px;
  writing-mode: vertical-lr;
  transform: rotate(180deg);
  cursor: pointer;
  text-align: center;
  font-weight: 600;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  border-radius: 0 8px 8px 0;
  position: relative;
  overflow: hidden;
}

.survey-tab:hover {
  transform: rotate(180deg) translateX(-5px);
  box-shadow: 0 0 15px rgba(74, 108, 247, 0.5);
  padding-left: 20px;
  padding-right: 20px;
}

.survey-tab:after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: 0.5s;
}

.survey-tab:hover:after {
  left: 100%;
}

/* Botões com loading */
.survey-prev-btn:disabled,
.survey-next-btn:disabled,
.survey-submit-btn:disabled {
  opacity: 0.8;
  cursor: not-allowed;
}

.survey-prev-btn .spinner-border,
.survey-next-btn .spinner-border,
.survey-submit-btn .spinner-border {
  margin-right: 5px;
  vertical-align: middle;
}

/* Animação de fade-in para o tab */
@keyframes fadeInTab {
  from { opacity: 0; transform: translateX(20px) translateY(-50%); }
  to { opacity: 1; transform: translateX(0) translateY(-50%); }
}

.survey-tab-container.position-right {
  animation: fadeInTab 0.5s ease-out;
}

@keyframes fadeInTabLeft {
  from { opacity: 0; transform: translateX(-20px) translateY(-50%); }
  to { opacity: 1; transform: translateX(0) translateY(-50%); }
}

.survey-tab-container.position-left {
  animation: fadeInTabLeft 0.5s ease-out;
}

/* Survey Popup */
.survey-popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.5s;
}

.survey-popup {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10001;
  width: 400px;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform, opacity;
  opacity: 0;
  visibility: hidden;
}

.survey-popup.position-right {
  right: -420px;
  transform: translateY(-50%) translateX(100%);
}

.survey-popup.position-left {
  left: -420px;
  transform: translateY(-50%) translateX(-100%);
}

.survey-popup.active {
  opacity: 1;
  visibility: visible;
}

.survey-popup.active.position-right {
  right: 20px;
  transform: translateY(-50%) translateX(0);
}

.survey-popup.active.position-left {
  left: 20px;
  transform: translateY(-50%) translateX(0);
}

.survey-popup-header {
  padding: 16px 20px;
  background: #4a6cf7;
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-radius: 8px 8px 0 0;
}

.survey-title {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 600;
}

.survey-close-btn {
  background: transparent;
  border: none;
  color: inherit;
  cursor: pointer;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  transition: background-color 0.2s;
}

.survey-close-btn:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

.survey-popup-body {
  padding: 20px;
  overflow-y: auto;
  flex-grow: 1;
}

.survey-description {
  margin-bottom: 20px;
}

.survey-page-container {
  min-height: 200px;
}

.survey-popup-footer {
  padding: 15px 20px;
  border-top: 1px solid #eaeaea;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.survey-buttons {
  display: flex;
  gap: 10px;
}

.survey-prev-btn,
.survey-next-btn,
.survey-submit-btn {
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 500;
  border: none;
}

.survey-prev-btn {
  background-color: #e9ecef;
  color: #495057;
}

.survey-next-btn,
.survey-submit-btn {
  background-color: #4a6cf7;
  color: white;
}

.survey-prev-btn:hover {
  background-color: #dee2e6;
}

.survey-next-btn:hover,
.survey-submit-btn:hover {
  background-color: #3f5ad7;
}

/* Survey Page */
.survey-page {
  animation: fadeIn 0.3s;
}

.page-title {
  font-size: 1.0rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.page-description {
  margin-bottom: 20px;
  color: #666;
}

/* Questions */
.survey-questions {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.survey-question {
  margin-bottom: 16px;
}

.question-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
}

.required-mark {
  color: #dc3545;
  margin-left: 4px;
}

.question-help-text {
  color: #6c757d;
  font-size: 0.9rem;
  margin-bottom: 8px;
}

.question-input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #ced4da;
  border-radius: 4px;
}

/* Radio and Checkbox Options */
.radio-options,
.checkbox-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.radio-option,
.checkbox-option {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Range Slider */
.range-container {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.range-labels {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

.form-range {
  width: 100%;
}

.range-value {
  text-align: center;
  margin-top: 8px;
  font-weight: 500;
}

/* Star Rating */
.rating-container {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.rating-labels {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

.star-rating {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.star {
  font-size: 1.5rem;
  cursor: pointer;
  color: #dee2e6;
  transition: color 0.2s;
}

.star.active {
  color: #ffc107;
}

.star:hover {
  color: #ffc107;
}

/* Thank You Message */
.survey-thank-you {
  text-align: center;
  padding: 30px 10px;
  animation: fadeIn 0.5s;
}

.thank-you-message {
  font-size: 1.1rem;
  margin-bottom: 10px;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Responsive Adjustments */
@media (max-width: 576px) {
  .survey-popup {
    width: 100%;
    max-width: 100%;
    height: 100%;
    max-height: 100%;
    top: 0;
    transform: none;
    border-radius: 0;
  }
  
  .survey-popup.active.position-right,
  .survey-popup.active.position-left {
    right: 0;
    left: 0;
  }
  
  .survey-tab-container {
    display: none;
  }
}

.survey-popup-overlay.active {
  opacity: 1;
  visibility: visible;
} 