/* MAIN DEFAULT STYLES */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Roboto Condensed", sans-serif;
}

#background-pic {
  top: 0;
  left: 0;
  position: fixed;
  object-fit: cover;
  object-position: center 20%; /* CONTROLS x y display  */
  z-index: -1;
  height: 100%;
  width: 100%;
  opacity: 0.8;
}

h1,
h2,
p {
  margin: 0;
  padding: 0;
}

a {
  text-decoration: none;
  color: black;
  display: block;
}

ul,
li {
  list-style: none;
  padding: 0;
  margin: 0;
}

h3 {
  margin-top: 3rem;
  padding: 0;
  text-align: center;
  font-size: 3rem;
}

.hidden {
  display: none !important;
}

/* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */

/* ----------------------------------- */
/* AUTH FORM STYLES */
/* ------------------------------------- */
#auth-form-wrapper {
  margin: 3rem auto;
  max-width: 500px;
  padding: 1.5rem 2rem;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

#auth-form-wrapper li {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

#auth-pw-list-item {
  margin-bottom: 1.5rem;
}

#auth-label {
  margin-left: 0.2rem;
  font-size: 1.6rem;
  font-weight: 600;
  text-align: left;
  color: #2d3748;
}

/* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */

/* ----------------------------------- */
/* INPUT FORM STYLES */
/* ------------------------------------- */

#input-form-wrapper {
  /* margin: 3rem auto; */
  margin: 1.5rem auto;
  max-width: 700px;
  display: flex;
  background: #ffffff;
  flex-direction: column;
  /* gap: 1.5rem; */
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
}

#input-form-element {
  width: 100%;
  margin: 0 auto;
}

.form-title {
  width: 100%;
  text-align: left;
  margin: 0 auto;
  padding: 1rem 2rem;
}

/* SETS HEIGHT FOR LIST ITEMS */
.form-list-item {
  padding: 1rem 2rem;
}

.form-list-item:first-child {
  padding-top: 1.25rem;
}

.form-list-item:last-child {
  padding-top: 0.5rem;
  padding-bottom: 1.25rem;
}

.form-row {
  display: flex;
  gap: 1.5rem;
  align-items: flex-end;
}

.form-select-half {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* override for toggle */
#model-options-toggle {
  flex: 0 0 auto; /* Don't grow, don't shrink, use auto width */
  min-width: fit-content;
}

#model-options-toggle .toggle-wrapper {
  width: fit-content;
  min-width: fit-content;
}

#model-options-list-item {
  gap: 3rem;
}

#priority-div {
  flex: 3;
}

#max-tokens-div,
#temperature-div {
  flex: 1;
  text-align: center;
}

.form-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.1rem;
  margin-left: 0.25rem;
}

.form-select,
.form-input,
.form-textarea {
  width: 100%;
  padding: 11px 14px;
  font-size: 1rem;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: #111827;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(209, 213, 219, 0.6);
  border-radius: 8px;
  outline: none;
  transition: all 0.2s ease;
}

.form-textarea {
  overflow-y: auto; /* <-- Add this */
  resize: vertical; /* Optional: allows user to resize vertically */
}

.form-select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%236b7280' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
}

.form-input:hover,
.form-textarea:hover {
  border-color: #9ca3af;
  background: rgba(255, 255, 255, 0.85);
}

.form-input::placeholder {
  color: #9ca3af;
}

.form-textarea::placeholder {
  color: #555555;
  font-size: 1.1rem;
  padding: 0;
}

#temperature-input,
#max-tokens-input {
  text-align: right;
  width: auto;
}

.upload-row-wrapper {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 2rem;
}

.upload-status {
  display: inline-block;
  vertical-align: middle;
}

.toggle-wrapper {
  background: rgba(234, 235, 236, 0.9);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  cursor: pointer;
}

.model-options-toggle-btn {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: #6b7280;
  font-size: 14px;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.model-options-toggle-btn.expanded {
  transform: rotate(45deg);
}

/* +++++++++++++++++++++++++++++++++++++++++++++++++ */

/* CLASSES */

.password-input-wrapper {
  position: relative;
  width: 100%;
}

.password-input {
  width: 100%;
  padding: 14px 48px 14px 16px;
  font-size: 16px;
  font-weight: 400;
  color: #2d3748;
  border: 1px solid #cbd5e0;
  border-radius: 8px;
  outline: none;
  box-sizing: border-box;
  transition: all 0.2s ease;
}

.password-input:hover {
  /* border-color: #3b82f6; */
  border-color: #164388;
}

.password-input:focus {
  border-color: #164388;
  box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.password-input::placeholder {
  color: #a0aec0;
}

.password-toggle-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  padding: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #718096;
  transition: color 0.2s ease;
}

.password-toggle-btn:hover {
  color: #374151;
}

.password-toggle-btn:focus {
  outline: 2px solid #164388;
  outline-offset: 2px;
}

.password-toggle-btn svg {
  width: 20px;
  height: 20px;
}

.btn-submit {
  width: 100%;
  padding: 16px 24px;
  font-family: "Roboto Condensed", sans-serif;
  font-size: 16px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #ffffff;
  background: #2563a8;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(74, 144, 226, 0.25);
}

.btn-submit:hover {
  background: linear-gradient(135deg, #3573b8 0%, #2563a8 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(74, 144, 226, 0.35);
}

.btn-submit:active {
  transform: translateY(0);
  background: linear-gradient(135deg, #1d5398 0%, #164388 100%);
  box-shadow: 0 2px 8px rgba(74, 144, 226, 0.25);
}

.btn-upload {
  width: 100%;
  padding: 16px 24px;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #000000;
  background-color: transparent;
  border: 2px solid #000000;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-upload:hover {
  background: #f0f0f0;
  transform: translateY(-2px);
}

.btn-upload:active {
  transform: translateY(0);
  background: #e0e0e0;
}

.btn-delete {
  margin-top: 1rem;
  margin-left: auto;
  padding: 0.75rem 4rem;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #dc2626;
  background-color: transparent;
  border: 2px solid #dc2626;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-delete:hover {
  background: #fef2f2;
  transform: translateY(-2px);
}

.btn-delete:active {
  transform: translateY(0);
  background: #fee2e2;
}

/* COLLAPSE FUNCTIONALITY STYLES */
.collapse-container {
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 12px;
  overflow: hidden;
}

.collapse-header {
  padding: 0.25rem 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid #d1d5db;
}

.collapse-arrow {
  display: none;
}

.collapse-content {
  transition: all 0.2s ease;
}

.collapse-content.hidden + .collapse-header,
.collapse-header:has(+ .collapse-content.hidden) {
  border-bottom: none;
}

/* --------------------------- */

/* LOADING STYLES */

.loading-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.95);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.loading-overlay.active {
  display: flex;
}

.spinner {
  width: 60px;
  height: 60px;
  border: 6px solid #e8e8e8;
  border-top-color: #555;
  border-radius: 50%;
  animation: spin 1.2s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.loading-text {
  margin-top: 20px;
  color: #666;
  font-size: 16px;
  font-weight: 500;
}
