/* GLOBAL */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --font-size-small: 14px;
  --font-size-regular: 16px;
  --font-size-extra-large: 24px;

  --color-white-50: #ffffff80;
  --color-white-100: #ffffff;
  --color-white-border: #F7F7F7;
  --color-gray-400: #DFD8D8;
  --color-gray-500: #8A8A8A;
  --color-gray-550: #949494;
  --color-gray-600: #6E6E6E;
  --color-pink: #CAB6B6;
  --color-purple: #8A92FF;
  --color-black-900: #1B1B1B;
  --color-black-1000: #000000;
}

body {
  font-family: "Inter", sans-serif;
  font-size: var(--font-size-regular);
  font-weight: 400;
  background-image: url("./icons/background-2.svg");
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
  margin: 0;
  padding: 0;
  min-height: 100vh;
}

body[data-theme="3"] {
  background-image: url("./icons/background-3.svg");
}

.container {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  padding: 20px;
}

fieldset {
  border: none;
  padding: 0;
  margin: 0;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* HOMEPAGE */
.header-row {
  position: relative;
  z-index: 100;
  display: flex;
  width: 100%;
  padding: 12px 24px;
  justify-content: space-between;
  align-items: center;
  border-radius: 999px;
  background: var(--color-white-50);
  backdrop-filter: blur(4px);
  margin-bottom: 42px;
}

@media (max-width: 480px) {
  .header-row {
    flex-direction: column;
    padding: 24px;
    gap: 32px;
    border-radius: 48px;
  }
}

.logo {
  height: 20px;
  flex-shrink: 0;
  fill: #1B1B1B;
}

.settings-container {
  position: relative;
}

.settings-toggle {
  font-family: "Inter", sans-serif;
  font-size: var(--font-size-regular);
  font-weight: 500;
  cursor: pointer;
  display: flex;
  padding: 10px 12px;
  align-items: center;
  gap: 4px;
  border-radius: 999px;
  border: 1px solid var(--color-white-border);
  background: var(--color-white-100);
  transition: background 0.25s ease-in-out;
  box-shadow: 
    0px 32px 9px 0px rgba(163, 163, 163, 0.00), 
    0px 20px 8px 0px rgba(163, 163, 163, 0.01), 
    0px 11px 7px 0px rgba(163, 163, 163, 0.05), 
    0px 5px 5px 0px rgba(163, 163, 163, 0.09), 
    0px 1px 3px 0px rgba(163, 163, 163, 0.10);
}

.settings-container.dropdown-opened .settings-toggle,
.settings-toggle:hover,
.settings-toggle:focus-visible {
  background: var(--color-white-border);
}

.settings-toggle .button-text {
  color: var(--color-gray-500);
  font-size: var(--font-size-regular);
  font-weight: 500;
}

.settings-toggle .button-icon {
  width: 20px;
  height: 20px;
}

.settings-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 16px;
  border-radius: 18px;
  border: 2px solid var(--color-white-100);
  background: var(--color-white-border);
  box-shadow: 
    0px 32px 9px 0px rgba(163, 163, 163, 0.00), 
    0px 20px 8px 0px rgba(163, 163, 163, 0.01), 
    0px 11px 7px 0px rgba(163, 163, 163, 0.05), 
    0px 5px 5px 0px rgba(163, 163, 163, 0.09), 
    0px 1px 3px 0px rgba(163, 163, 163, 0.10);
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
  transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out;
}

.settings-container.dropdown-opened .settings-dropdown {
  opacity: 1;
  transform: translateY(0);
  pointer-events: initial;
}

.settings-form-group {
  display: flex;
  justify-content: space-between;
  align-items: center;
  align-self: stretch;
  gap: 30px;
}

.settings-form-group.data-type {
  margin-bottom: 24px;
}

.settings-form-group.response-type {
  display: none;
}

.settings-form-group.api-type {
  position: relative;
}

.settings-form-group label {
  color: var(--color-gray-500);
  font-size: var(--font-size-small);
  font-weight: 400;
  width: max-content;
}

.settings-form-group.api-type label {
  display: none;
}

.settings-form-group select {
  padding: 8px 12px;
  width: 160px;
  border-radius: 18px;
  border: 1px solid var(--color-white-border);
  background: var(--color-white-100);
  box-shadow: 
    0px 32px 9px 0px rgba(163, 163, 163, 0.00), 
    0px 20px 8px 0px rgba(163, 163, 163, 0.01), 
    0px 11px 7px 0px rgba(163, 163, 163, 0.05), 
    0px 5px 5px 0px rgba(163, 163, 163, 0.09), 
    0px 1px 3px 0px rgba(163, 163, 163, 0.10);
}

.settings-form-group.api-type select {
  padding: 10px 42px 10px 12px;
  border-radius: 999px;
  color: var(--color-gray-500);
  font-size: var(--font-size-regular);
  font-weight: 500;
  position: relative;
  appearance: none; /* Remove default arrow */
  -webkit-appearance: none;
  -moz-appearance: none;
  width: max-content;
  line-height: 1.5;
}

@media (max-width: 480px) {
  .settings-form-group.api-type select {
    width: 100%;
  }
}

.settings-form-group.api-type::after {
  content: '';
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  pointer-events: none;
  background-image: url("./icons/settings-icon.svg");
  background-size: contain;
  background-repeat: no-repeat;
  width: 20px;
  height: 20px;
}

.theme-type-options {
  position: relative;
  display: flex;
  gap: 8px;
  padding: 6px;
  width: 160px;
  border-radius: 36px;
  border: 1px solid var(--color-white-border);
  background: var(--color-white-100);
  box-shadow: 
    0px 32px 9px 0px rgba(163, 163, 163, 0.00), 
    0px 20px 8px 0px rgba(163, 163, 163, 0.01), 
    0px 11px 7px 0px rgba(163, 163, 163, 0.05), 
    0px 5px 5px 0px rgba(163, 163, 163, 0.09), 
    0px 1px 3px 0px rgba(163, 163, 163, 0.10);
}

.theme-type-options button {
  position: relative;
  z-index: 1;
  border: none;
  background: none;
  cursor: pointer;
  flex-basis: 100%;
  background-color: transparent;
  color: var(--color-black-900);
  padding: 8px 12px;
  border-radius: 18px;
  transition: background-color 0.1s ease-in-out, color 0.1s ease-in-out;
}

body[data-theme="2"] .theme-type-options button:nth-child(1) {
  color: var(--color-white-100);
}

body[data-theme="3"] .theme-type-options button:nth-child(2) {
  color: var(--color-white-100);
}

.theme-type-options .active-indicator {
  position: absolute;
  top: 6px;
  left: 6px;
  width: calc(calc(100% - 12px - 8px) / 2);
  height: calc(100% - 12px);
  border-radius: 18px;
  background-color: var(--color-black-900);
  transition: transform 0.25s ease-in-out;
}

body[data-theme="3"] .theme-type-options .active-indicator {
  transform: translateX(calc(100% + 8px));
}

.theme-type-options button.active {
  background-color: var(--color-black-900);
  color: var(--color-white-100);
}

body[data-theme="2"] .theme-type-options button:nth-child(2):hover,
body[data-theme="2"] .theme-type-options button:nth-child(2):focus-visible,
body[data-theme="3"] .theme-type-options button:nth-child(1):hover,
body[data-theme="3"] .theme-type-options button:nth-child(1):focus-visible {
  background-color: var(--color-white-border);
}

.form-row,
.response-row,
.update-row {
  width: 100%;
  margin-bottom: 22px;
}

.form-row input,
.form-row textarea,
.response-row,
.update-row {
  font-family: "Inter", sans-serif;
  font-size: var(--font-size-regular);
  font-weight: 400;
  color: var(--color-gray-600);
  width: 100%;
  padding: 16px;
  border-radius: 18px;
  border: 2px solid var(--color-white-100);
  background: var(--color-white-50);
  backdrop-filter: blur(4px);
  outline: none;
}

.form-row input:focus,
.form-row textarea:focus {
  outline: 2px solid var(--color-pink);
}

.form-row input::placeholder,
.form-row textarea::placeholder {
  color: var(--color-pink);
}

.form-row textarea {
  min-height: 160px;
  resize: none;
}

.form-row button,
.download-btn,
.upload-btn {
  font-family: "Inter", sans-serif;
  font-size: var(--font-size-regular);
  font-weight: 600;
  width: 100%;
  padding: 16px;
  border-radius: 18px;
  background: var(--color-black-900) !important;
  color: var(--color-white-100) !important;
  transition: background 0.25s ease-in-out;
  cursor: pointer;
  margin: 0 !important;
}

.form-row button:hover,
.form-row button:focus-visible,
.download-btn:hover,
.download-btn:focus-visible,
.upload-btn:hover,
.upload-btn:focus-visible {
  background: var(--color-black-1000) !important;
}

.form-row .submit-btn {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
}

.submit-btn .submit-btn-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

/* body[data-theme="2"] .submit-btn .submit-btn-icon {
  display: none;
} */

.answer-section {
  padding-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.answer-section-header {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
}

.answer-section-header h2 {
  font-size: var(--font-size-regular);
  font-weight: 500;
  color: var(--color-gray-550);
}

.answer-section-header .line {
  flex-grow: 1;
  height: 2px;
  background: var(--color-gray-400);
}

.response-row,
.update-row {
  display: flex;
  flex-direction: column;
}

.response-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.response-header .profile {
  display: flex;
  align-items: center;
  gap: 8px;
}

.response-header .profile-name {
  font-size: var(--font-size-regular);
  font-weight: 600;
  color: var(--color-black-1000);
}

.response-action {
  cursor: pointer;
  border: none;
  background: none;
  border-radius: 12px;
}

.response-action--copy {
  display: flex;
  padding: 8px;
  align-items: center;
  gap: 8px;
  background: var(--color-white-100);
  border-radius: 12px;
  transition: background 0.25s ease-in-out;
}

.response-action--copy.text-copied {
  background: var(--color-white-border);
}

/* body[data-theme="3"] .response-action--copy {
  padding: 8px 16px;
} */

.response-action--copy:hover,
.response-action--copy:focus-visible {
  background: var(--color-white-border);
}

.response-action--copy .copy-btn-icon {
  width: 24px;
  height: 24px;
}

body[data-theme="2"] .response-action--copy .copy-btn-icon svg path {
  fill: var(--color-gray-500);
}

.response-action--copy .copy-btn-text {
  font-size: var(--font-size-regular);
  font-weight: 500;
  color: var(--color-purple);
  display: none;
}

/* body[data-theme="2"] .response-action--copy .copy-btn-text {
  display: none;
} */

.answer-section-body {
  border: none;
  background: none;
  resize: none;
  font-family: "Inter", sans-serif;
  margin-top: 12px;
  font-size: var(--font-size-small);
  color: var(--color-gray-600);
  font-weight: 400;
  padding-left: 44px;
  line-height: 1.5;
}

.answer-section-body:focus {
  outline: none;
}