/**
 * Styles
 */

/* Container */
.syntcv-container {
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu,
    Cantarell, "Helvetica Neue", sans-serif;
  margin: 0 auto;
  padding: 20px;
  background-color: #f7f9fc;
  border-radius: 10px;
}

/* Title */
.syntcv-title {
  text-align: center;
  margin-top: 0;
  margin-bottom: 30px;
  font-size: 28px;
  font-weight: 600;
}

button#syntcv-print-btn,
button#syntcv-copy-btn {
  background: #000;
}

.syntcv-regenerate-wrapper button {
  margin: 0 10px;
}

/* Form Wrapper */
.syntcv-form-wrapper {
  background-color: #ffffff;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  overflow: hidden;
}

/* Form */
.syntcv-form {
  padding: 40px 20px;
}

.syntcv-form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  align-items: flex-end;
  justify-content: space-between;
}

.syntcv-form-group {
  flex-basis: calc(16% - 15px);
  min-width: 150px;
  margin-bottom: 10px;
}

.syntcv-form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
  color: #555;
  font-size: 14px;
}

.syntcv-input,
.syntcv-select {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
}

.syntcv-input:focus,
.syntcv-select:focus {
  outline: none;
  border-color: #1e73be;
  box-shadow: 0 0 0 2px rgba(30, 115, 190, 0.1);
}

.syntcv-submit-group {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

/* Buttons */
.syntcv-button {
  background-color: #8224e3;
  color: white;
  border: none;
  border-radius: 4px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: background-color 0.2s;
  position: relative;
}

.syntcv-button:hover {
  background-color: #8d4bcf;
}

.syntcv-button .syntcv-icon {
  margin-right: 6px;
}

.syntcv-button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.syntcv-loading-btn::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.2);
  animation: pulse 1.5s infinite;
  border-radius: 4px;
}

@keyframes pulse {
  0% {
    opacity: 0.2;
  }
  50% {
    opacity: 0.5;
  }
  100% {
    opacity: 0.2;
  }
}

.syntcv-regenerate {
  margin-top: 20px;
}

.syntcv-regenerate-wrapper {
  display: flex;
  justify-content: center;
  padding: 20px;
}

/* Results */
.syntcv-results {
  padding: 20px;
}

.syntcv-results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid #eee;
}

.syntcv-results-header h3 {
  margin: 0;
  font-size: 20px;
  color: #333;
}

/* Toggle Switch */
.syntcv-toggle-all,
.syntcv-toggle {
  display: flex;
  align-items: center;
}

.syntcv-toggle-all label,
.syntcv-toggle label {
  margin-right: 10px;
  font-size: 12px;
  color: #666;
  font-weight: 500;
}

.syntcv-toggle-switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 20px;
}

.syntcv-toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.syntcv-toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.4s;
  border-radius: 20px;
}

.syntcv-toggle-slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 2px;
  bottom: 2px;
  background-color: white;
  transition: 0.4s;
  border-radius: 50%;
}

input:checked + .syntcv-toggle-slider {
  background-color: #8224e3;
}

input:focus + .syntcv-toggle-slider {
  box-shadow: 0 0 1px #8224e3;
}

input:checked + .syntcv-toggle-slider:before {
  transform: translateX(20px);
}

/* Category Section */
.syntcv-category-section {
  margin-bottom: 30px;
}

.syntcv-category-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.syntcv-category-header h4 {
  margin: 0;
  font-size: 18px;
  color: #333;
}

/* Question Item */
.syntcv-question-item {
  background-color: #f9f9f9;
  border-radius: 5px;
  margin-bottom: 15px;
  overflow: hidden;
}

.syntcv-question-header {
  padding: 15px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.syntcv-question-number-wrapper {
  display: flex;
  flex: 1;
  font-weight: bold;
}

.syntcv-question-number {
  margin-right: 8px;
  font-weight: 600;
}

.syntcv-info-icon {
  color: #1e73be;
  cursor: pointer;
  width: 20px;
  height: 20px;
  text-align: center;
  line-height: 20px;
  border-radius: 50%;
  margin-left: 10px;
  transition: background-color 0.2s;
}

.syntcv-info-icon:hover {
  background-color: rgba(30, 115, 190, 0.1);
}

.syntcv-answer {
  padding: 15px;
  padding-top: 0;
  color: #555;
  line-height: 1.5;
  border-top: 1px solid #eee;
}

/* Loading */
.syntcv-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 0;
}

.syntcv-spinner {
  border: 3px solid rgba(0, 0, 0, 0.1);
  border-top: 3px solid #8224e3;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  animation: spin 1s linear infinite;
  margin-bottom: 15px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Custom toggle styling to match design */
.syntcv-toggle-switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 24px;
}

.syntcv-toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.4s;
  border-radius: 24px;
}

.syntcv-toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.4s;
  border-radius: 50%;
}

input:checked + .syntcv-toggle-slider {
  background-color: #8224e3;
}

input:checked + .syntcv-toggle-slider:before {
  transform: translateX(24px);
}

/* Error Message */
.syntcv-error {
  background-color: #fef1f1;
  border-left: 4px solid #dc3232;
  padding: 15px;
  margin-bottom: 20px;
  color: #444;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .syntcv-form-row {
    flex-direction: column;
  }

  .syntcv-form-group {
    width: 100%;
  }

  .syntcv-results-header,
  .syntcv-category-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .syntcv-toggle-all,
  .syntcv-toggle {
    margin-top: 10px;
  }
}
