/* Google Forms-like Styles */
.google-form-container {
  font-family: 'Roboto', 'Helvetica', 'Arial', sans-serif;
  /* max-width: 1000px; */
  /* margin: 0 auto; */
  padding: 20px;
  /* background-color: #f8f9fa; */
  /* min-height: 100vh; */
}

/* Form Builder Styles */
.form-builder {
  background-color: white;
  border-radius: 8px;
  /* box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1); */
  padding: 24px;
}

.form-header {
  border-bottom: 1px solid #dadce0;
  padding-bottom: 16px;
  margin-bottom: 24px;
}

.form-title-container {
  margin-bottom: 16px;
}

.form-title-input {
  font-size: 32px;
  font-weight: 400;
  width: 100%;
  border: none;
  border-bottom: 1px solid transparent;
  padding: 8px 0;
  margin-bottom: 8px;
}

.form-title-input:focus {
  border-bottom: 1px solid #4285f4;
  outline: none;
}

.form-description-input {
  font-size: 14px;
  width: 100%;
  border: none;
  border-bottom: 1px solid transparent;
  padding: 8px 0;
}

.form-description-input:focus {
  border-bottom: 1px solid #4285f4;
  outline: none;
}

.question-card {
  border: 1px solid #dadce0;
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 16px;
  position: relative;
  transition: all 0.2s;
}

.question-card.active {
  border: 1px solid #4285f4;
  box-shadow: 0 0 0 1px #4285f4;
}

.question-header {
  display: flex;
  margin-bottom: 16px;
}

.question-input {
  flex: 1;
  font-size: 16px;
  border: none;
  border-bottom: 1px solid transparent;
  padding: 8px 0;
}

.question-input:focus {
  border-bottom: 1px solid #4285f4;
  outline: none;
}

.question-type-select {
  width: 180px;
  margin-left: 16px;
  border: 1px solid #dadce0;
  border-radius: 4px;
  padding: 8px;
}

.google-input {
  border: none;
  border-bottom: 1px solid #dadce0;
  border-radius: 0;
  padding: 8px 0;
  box-shadow: none;
}

.google-input:focus {
  border-bottom: 2px solid #4285f4;
  box-shadow: none;
}

.options-container {
  margin-left: 24px;
}

.option-item {
  margin-bottom: 8px;
}

.google-option-input {
  border: none;
  border-bottom: 1px solid #dadce0;
  border-radius: 0;
  padding: 8px 0;
  box-shadow: none;
  flex: 1;
}

.google-option-input:focus {
  border-bottom: 2px solid #4285f4;
  box-shadow: none;
}

.radio-container {
  width: 20px;
  height: 20px;
  border: 2px solid #5f6368;
  border-radius: 50%;
}

.checkbox-container {
  width: 20px;
  height: 20px;
  border: 2px solid #5f6368;
  border-radius: 4px;
}

.add-option-btn {
  color: #1a73e8;
  text-decoration: none;
  font-size: 14px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}

.question-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #f1f3f4;
}

.delete-btn {
  color: #5f6368;
  padding: 8px;
  border: none;
  background: none;
  cursor: pointer;
}

.delete-btn:hover {
  color: #d93025;
}

.add-question-section {
  margin-top: 24px;
}

.question-types {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.add-question-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background-color: white;
  border: 1px solid #dadce0;
  border-radius: 4px;
  cursor: pointer;
  color: #5f6368;
  font-size: 14px;
}

.add-question-btn:hover {
  background-color: #f8f9fa;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 16px;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid #dadce0;
}

.preview-btn,
.save-btn {
  padding: 8px 24px;
  border-radius: 4px;
  font-weight: 500;
  cursor: pointer;
}

.preview-btn {
  background-color: white;
  border: 1px solid #dadce0;
  color: #5f6368;
}

.save-btn {
  background-color: #1a73e8;
  color: white;
  border: none;
}

/* Preview Styles */
.form-preview {
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  padding: 40px;
}

.preview-header {
  border-bottom: 1px solid #dadce0;
  padding-bottom: 24px;
  margin-bottom: 24px;
}

.preview-title {
  font-size: 32px;
  font-weight: 400;
  margin-bottom: 12px;
  color: #202124;
}

.preview-description {
  font-size: 14px;
  color: #5f6368;
  margin-bottom: 16px;
}

.preview-actions {
  margin-top: 16px;
}

.back-to-editor-btn {
  background: none;
  border: none;
  color: #1a73e8;
  font-weight: 500;
  cursor: pointer;
  padding: 8px;
}

.preview-question {
  margin-bottom: 32px;
}

.preview-question-header {
  margin-bottom: 16px;
}

.preview-question-header label {
  font-size: 16px;
  color: #202124;
}

.required-star {
  color: #d93025;
}

.empty-form-message {
  color: #5f6368;
  font-style: italic;
  text-align: center;
  padding: 40px 0;
}

/*  */

/* Right sidebar container */
.question-types-sidebar.right-sidebar {
  width: 60px;
  background: #f8f9fa;
  border-radius: 12px;
  padding: 15px 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  position: sticky;
  top: 120px;
  height: fit-content;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 10;
}

/* Sidebar header */
.sidebar-header {
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  text-align: center;
  padding-bottom: 12px;
  margin-bottom: 15px;
  transition: border-color 0.3s ease;
}

/* Question type icons */
.question-type-icon {
  font-size: 20px;
  color: #495057;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  margin: 0 auto 5px;
}

.question-type-icon:hover {
  background: rgba(74, 108, 247, 0.1);
  color: #4a6cf7;
  transform: translateY(-2px) scale(1.1);
}

.expand-toggle:hover {
  transform: rotate(360deg) scale(1.1);
}

/* Question types list */
.question-types-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  animation: fadeIn 0.3s ease-out;
}

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

/* Tooltip styles */
.tooltip-text {
  visibility: hidden;
  width: max-content;
  max-width: 140px;
  background-color: #2d3748;
  color: #fff;
  text-align: center;
  border-radius: 6px;
  padding: 6px 10px;
  position: absolute;
  z-index: 100;
  left: calc(100% + 12px);
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  transform: translateX(-5px);
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.tooltip-text::after {
  content: "";
  position: absolute;
  right: 100%;
  top: 50%;
  margin-top: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: transparent #2d3748 transparent transparent;
}

.question-type-icon:hover .tooltip-text {
  visibility: visible;
  opacity: 1;
  transform: translateX(0);
  transition-delay: 0.1s;
}

/* Layout adjustments */
.form-builder-wrapper {
  display: flex;
  gap: 24px;
  position: relative;
}

.form-builder {
  flex-grow: 1;
  transition: margin-right 0.3s ease;
}

.google-input:disabled {
    background-color: #f5f5f5;
    color: #333;
    cursor: not-allowed;
}