/* ====== Font Face Declarations ====== */
@font-face {
  font-family: "rubik-bold";
  src: url("/app/fonts/webfonts/Rubik-Bold.ttf");
  font-display: swap;
}

@font-face {
  font-family: "rubik-semibold";
  src: url("/app/fonts/webfonts/Rubik-SemiBold.ttf");
  font-display: swap;
}

@font-face {
  font-family: "rubik-medium";
  src: url("/app/fonts/webfonts/Rubik-Medium.ttf");
  font-display: swap;
}

/* ====== Color & Typography Variables ====== */
:root {
  --color-white: #fff;
  --color-gray: #a1a5b0;
  --color-gray-light: #f7f4f2;
  --color-cream: #f4f0ef;
  --color-blue: #023047;
  --color-purple: #a434ff;
  --color-brown: #544235;
  --color-blue-dark: #7f8d97;
  --color-red: #ea3546;
  --color-shadow: 0 3px 6px rgba(141, 107, 80, 0.1);
  --color-shadow-hovered: 0 5px 10px rgba(141, 107, 80, 0.5);
  --container-bg: var(--color-white);
  --size-max-width: 320px;
  --font-bold: rubik-bold;
  --font-semibold: rubik-semibold;
  --font-medium: rubik-medium;
}

body.theme-dark {
  --color-white: #eeeff7;
  --color-gray: #ccc;
  --color-gray-light: #121212;
  --color-cream: #2a2a3a;
  --color-blue: #4a90e2;
  --color-purple: #c77dff;
  --color-brown: #fdf5f5;
  --color-blue-dark: #647480;
  --color-red: #ff6b6b;
  --color-shadow: 0 3px 6px rgba(0, 0, 0, 0.4);
  --color-shadow-hovered: 0 5px 10px rgba(0, 0, 0, 0.6);
  --container-bg: #1e1e2f;
}

/* ====== Global Resets ====== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  transition: all 0.375s ease;
  color: var(--color-brown);
  font-family: var(--font-medium);
}

body {
  background-color: var(--color-gray-light);
}

button {
  cursor: pointer;
}

a {
  text-decoration: none;
}

input:focus {
  outline: none;
}

/* ====== Layout Wrappers ====== */
.setup-back-wrapper,
.setup-page-wrapper {
  max-width: var(--size-max-width);
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.create-back-container {
  margin: 30px 30px 30px 0;
  width: 250px;
  justify-self: left;
  justify-items: left;
}

.create-back-desc a {
  color: var(--color-blue-dark);
  font-size: 20px;
  font-weight: bold;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* ====== Typography ====== */
.create-title,
.create-title2,
.create-subtitle {
  color: var(--color-blue);
  max-width: 290px;
  margin: 50px auto;
  font-size: 2.8rem;
  font-family: var(--font-bold);
}

.create-title2 {
  font-size: 2.3rem;
  text-align: center;
  margin-bottom: 15px;
}

.create-subtitle {
  font-size: 1.2rem;
  text-align: center;
  margin-top: 15px;
}

label {
  font-size: 0.8rem;
  font-family: var(--font-semibold);
  background: transparent !important;
  padding: 0.5rem 0;
  display: block;
}

/* ====== Progress UI ====== */
.create-progress-container {
  margin: 30px;
  width: 250px;
  display: grid;
  gap: 8px;
  justify-self: center;
  justify-items: center;
}

.create-progress-desc {
  color: var(--color-purple);
  font-size: 1rem;
}

.create-progress-bar {
  background-color: var(--color-gray);
  width: 100%;
  border-radius: 8px;
}

.create-progress-fill {
  background-color: var(--color-purple);
  height: 23px;
  border-radius: 8px;
}

/* ====== Form Components ====== */
.create-form-col {
  display: grid;
  gap: 8px;
}

.create-form-row {
  display: grid;
  position: relative;
  background: none;
  border-radius: 0;
}

.create-form-row input,
.create-form-gender,
.create-form-other {
  background-color: var(--container-bg);
  border-radius: 20px;
}

input,
.create-form-gender,
.create-form-other {
  border-radius: 50px;
  border: none;
  background-color: var(--container-bg);
  box-shadow: var(--color-shadow);
  color: var(--color-brown);
  padding: 15px 18px;
  font-size: 0.8rem;
}

input[type="date"],
#location {
  padding-left: 45px;
}

input[type="date"]::-webkit-calendar-picker-indicator {
  opacity: 0;
  pointer-events: cursor;
  position: absolute;
  z-index: 2;
  left: 18px;
}

/* ====== Form Buttons ====== */
.create-form-button {
  margin: 30px 0 40px;
  background-color: var(--color-purple);
  color: var(--color-white);
  height: 50px;
  width: 290px;
  justify-self: center;
  border-radius: 50px;
  font-size: 0.9rem;
  box-shadow: var(--color-shadow);
  border: none;
}

.create-form-button:hover {
  box-shadow: var(--color-shadow-hovered);
}

/* ====== Gender & Checkbox ====== */
.create-form-row.gender,
.create-form-row.other {
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.create-form-gender,
.create-form-other {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.create-form-gender input[type="radio"],
.create-form-other input[type="checkbox"] {
  appearance: none;
  width: 16px;
  height: 16px;
  border: 2px solid var(--color-brown);
  border-radius: 50%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.create-form-gender input[type="radio"]:checked,
.create-form-other input[type="checkbox"]:checked {
  background: var(--color-white);
  border: 2px solid var(--color-white);
}

.create-form-gender input[type="radio"]:checked::after,
.create-form-other input[type="checkbox"]:checked::after {
  content: "";
  width: 6px;
  height: 6px;
  border: 2.5px solid var(--color-purple);
  background: var(--color-white);
  border-radius: 50%;
  position: absolute;
  margin: auto;
}

.create-form-gender:has(input:checked),
.create-form-other:has(input:checked) {
  background-color: var(--color-purple);
  color: var(--color-white);
}

.create-form-gender:has(input:checked) span,
.create-form-other:has(input:checked) span {
  color: var(--color-blue);
}

/* ====== Profile Picture Upload ====== */
.create-form-upload,
.create-form-preview,
.create-form-img {
  display: flex;
  width: 50px;
  height: 50px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1.5px dashed var(--color-brown);
  position: relative;
  cursor: pointer;
}

.create-form-icon.pen {
  right: 18px;
}

.create-form-icon {
  height: 18px;
  width: 18px;
  object-fit: contain;
  position: absolute;
  align-self: center;
  pointer-events: none;
  opacity: 0.8;
}

.form-file-input {
  display: none;
}

.create-form-upload-icon {
  width: 18px;
  height: 18px;
}

.create-form-row.pic {
  display: flex;
  gap: 10px;
  justify-items: flex-start;
}

.create-form-preview,
.create-form-img {
  border: none;
}

/* ====== Temperament & Dog Tabs ====== */
.create-form-row.energy,
.create-row.dog {
  display: flex;
  justify-content: space-evenly;
  background-color: var(--color-gray-light);
  border-radius: 20px;
  margin: 20px 0;
}

.create-form-energy,
.create-dog {
  border-radius: 20px;
  padding: 5px;
  width: 100%;
  text-align: center;
  border: 1.5px solid var(--color-gray-light);
}

.create-form-energy span,
.create-dog span {
  color: var(--color-gray);
}

.create-form-energy:has(input:checked),
.create-dog:has(input:checked) {
  background-color: var(--color-white);
}

.create-form-energy:has(input:checked) span,
.create-dog:has(input:checked) span {
  color: var(--color-purple);
}

.create-form-energy input[type="radio"] {
  display: none;
}

/* ====== Dark Mode Fixes ====== */
body.theme-dark .create-form-row,
body.theme-dark .create-form-other,
body.theme-dark .create-form-gender,
body.theme-dark .create-form-energy,
body.theme-dark .create-dog,
body.theme-dark .create-form-row.energy,
body.theme-dark .create-row.dog {
  background-color: var(--container-bg);
  border-radius: 20px;
}

body.theme-dark .create-form-energy,
body.theme-dark .create-dog {
  border: 1.5px solid var(--color-cream);
  background-color: var(--color-white);
}

body.theme-dark input,
body.theme-dark input[type="date"],
body.theme-dark select {
  background-color: #2c2c3c;
  color: var(--color-brown);
  border: none;
}

body.theme-dark input::placeholder,
body.theme-dark label,
body.theme-dark span {
  color: var(--color-gray);
}

body.theme-dark .create-form-energy:has(input:checked),
body.theme-dark .create-dog:has(input:checked) {
  background-color: var(--color-purple);
}

body.theme-dark .create-form-energy:has(input:checked) span,
body.theme-dark .create-dog:has(input:checked) span {
  color: var(--color-white);
}

/* ====== Responsive ====== */
@media screen and (min-width: 400px) {
  :root {
    --size-max-width: 375px;
  }
}