/* Design tokens mirrored from open-beatz-app src/scss/_theme.scss */
:root {
  --white: #ffffff;
  --orange: #f97316;
  --orange-dark: #ea580c;
  --default: #1c1a32;
  --default-40: #74737f;
  --default-60: #a2a2aa;
  --field-border: #e6e7e9;
  --grayscale-g1: #f6f7f8;
  --positive: #51aa6a;
  --negative: #ca3a31;
  --status-processed: #51aa6a;
  --status-processed-bg: #e7f4eb;
  --status-in-progress: #4881f7;
  --status-in-progress-bg: #e8f0ff;
  --status-pending: #ca3a31;
  --status-pending-bg: #f9e8e7;
}

* {
  box-sizing: border-box;
}

html {
  height: 100%;
}

/* min-height (not height) so pages with many fields grow past the viewport
   and keep their bottom padding instead of clipping at 100% */
body {
  min-height: 100%;
  margin: 0;
  padding: 0;
}

body {
  display: flex;
  font-family: "Noto Sans", sans-serif;
  color: var(--default);
  background-color: var(--white);
}

/* ---- Split layout (login.component.scss) ---- */

.left-panel {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  width: 60%;
  padding: 48px 32px 32px;
  background-color: var(--white);
}

.form-container {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  max-width: 600px;
  width: 60%;
  margin: auto 0;
}

.right-panel {
  display: flex;
  align-items: stretch;
  width: 40%;
  padding: 16px 16px 16px 0;
  background-color: var(--grayscale-g1);
  /* Sticky + fixed viewport height so the image stays the login-page size
     instead of stretching to match longer forms (e.g. registration). */
  position: sticky;
  top: 0;
  align-self: flex-start;
  height: 100vh;
}

/* Background image on a child of the hidden panel: browsers skip the download below 900px */
.hero-image {
  width: 100%;
  height: 100%;
  background-image: url("../img/herov2.webp");
  background-size: cover;
  background-position: center top;
  border-radius: 20px;
}

.logo {
  margin-bottom: 40px;
}

.logo-img {
  width: auto;
  height: 40px;
}

.welcome-title {
  margin: 0 0 8px;
  font-size: 32px;
  font-weight: 700;
  color: var(--default);
}

.welcome-subtitle {
  margin: 0;
  font-size: 15px;
  color: var(--default-40);
}

.subtitle-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: flex-start;
  gap: 4px 6px;
  margin: 0 0 32px;
}

.subtitle-link {
  margin: 0;
  font-size: 14px;
  white-space: nowrap;
  color: var(--default-40);
}

main,
form {
  width: 100%;
}

.copyright {
  margin-top: 24px;
  font-size: 13px;
  color: var(--default-60);
  text-align: center;
}

/* ---- Form fields (input.component.scss) ---- */

.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  color: var(--default);
}

.form-control {
  width: 100%;
  height: 42px;
  padding: 0 14px;
  font-family: inherit;
  font-size: 14px;
  color: var(--default);
  background-color: var(--white);
  border: 1px solid var(--field-border);
  border-radius: 4px;
  outline: none;
  transition: border-color 0.5s ease;
}

.form-control:hover {
  border-color: var(--default);
}

.form-control:focus {
  border-color: var(--orange);
}

.form-control::placeholder {
  color: var(--default-40);
}

.form-control[aria-invalid="true"] {
  border-color: var(--negative);
}

.form-control:-webkit-autofill,
.form-control:-webkit-autofill:hover,
.form-control:-webkit-autofill:focus {
  box-shadow: 0 0 0 1000px var(--white) inset;
  -webkit-text-fill-color: var(--default);
  transition: background-color 5000s ease-in-out 0s;
}

.input-error-message {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  color: var(--negative);
}

/* Password field with visibility toggle */

.password-toggle {
  position: relative;
}

.password-input {
  padding-right: 44px;
}

.toggle-password {
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 44px;
  height: 42px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--default-40);
  cursor: pointer;
}

.toggle-password:hover {
  color: var(--default);
}

/* ---- Dynamic user-profile fields (update account information) ---- */

.form-section-header {
  margin: 24px 0 4px;
  font-size: 16px;
  font-weight: 700;
  color: var(--default);
}

.form-section-description {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--default-40);
}

.required-marker {
  margin-left: 2px;
  color: var(--orange);
}

.input-helper-text {
  margin-top: 4px;
  font-size: 13px;
  color: var(--default-40);
}

select.form-control {
  cursor: pointer;
}

textarea.form-control {
  height: auto;
  min-height: 96px;
  padding: 10px 14px;
  resize: vertical;
}

.form-control:disabled {
  background-color: var(--grayscale-g1);
  color: var(--default-40);
  cursor: not-allowed;
}

.option-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.form-radio-input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--positive);
  cursor: pointer;
}

/* ---- Remember me + forgot password row ---- */

.options-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.options-container > div {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Checkbox (checkbox.component.scss) */

.form-check-input {
  appearance: none;
  -webkit-appearance: none;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin: 0;
  border: 2px solid #d1d5db;
  border-radius: 4px;
  background-color: var(--white);
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s;
}

.form-check-input:checked {
  border-color: var(--positive);
  background-color: var(--positive);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M2 6.5 4.5 9 10 3'/%3E%3C/svg%3E");
  background-size: 12px 12px;
  background-position: center;
  background-repeat: no-repeat;
}

.form-check-label {
  font-size: 14px;
  color: #374151;
  cursor: pointer;
  user-select: none;
}

.form-check-label a {
  color: var(--status-in-progress);
  text-decoration: underline;
}

.form-check-label a:visited {
  color: var(--orange);
}

.form-check-label a:hover {
  color: var(--orange-dark);
}

/* ---- Button (button.component.scss) ---- */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 50px;
  margin-top: 8px;
  padding: 0 12px;
  border: none;
  border-radius: 12px;
  outline: none;
  font-family: inherit;
  font-size: 15px;
  letter-spacing: 1.5px;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}

.btn-primary {
  font-weight: 900;
  color: var(--white);
  background-color: var(--orange);
}

.btn-primary:hover {
  background-color: var(--orange-dark);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary:disabled:hover {
  background-color: var(--orange);
}

.btn-secondary {
  font-weight: 600;
  color: var(--default);
  background-color: var(--white);
  border: 1px solid var(--field-border);
}

.btn-secondary:hover {
  border-color: var(--default);
}

.btn-outline {
  font-weight: 900;
  color: var(--orange);
  background-color: var(--white);
  border: 1px solid var(--orange);
}

.btn-outline:hover {
  color: var(--orange-dark);
  border-color: var(--orange-dark);
}

/* Keyboard focus (tab) highlight */

.btn:focus-visible,
.link-primary:focus-visible,
.form-check-label a:focus-visible,
.form-check-input:focus-visible,
.form-radio-input:focus-visible,
.toggle-password:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
  border-radius: 4px;
}

.btn:focus-visible {
  border-radius: 12px;
}

/* ---- Links ---- */

.link-primary {
  font-size: 14px;
  color: var(--orange);
  text-decoration: none;
}

.link-primary:hover {
  color: var(--orange-dark);
  text-decoration: underline;
}

.action-link {
  margin-top: 16px;
  text-align: center;
}


.register-prompt-text {
  margin: 0 0 12px;
  font-size: 14px;
  color: var(--default-40);
}

.options-container .action-link {
  margin-top: 0;
  text-align: right;
}

/* ---- Alerts / feedback messages ---- */

.alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 16px;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 14px;
}

.alert-success {
  color: var(--status-processed);
  background-color: var(--status-processed-bg);
}

.alert-info {
  color: var(--status-in-progress);
  background-color: var(--status-in-progress-bg);
}

.alert-warning {
  color: var(--orange-dark);
  background-color: #fdf1e5;
}

.alert-error {
  color: var(--status-pending);
  background-color: var(--status-pending-bg);
}

/* ---- Info pages (verify email, page expired, error) ---- */

.instruction {
  margin-bottom: 16px;
}

/* ---- Social providers (info section) ---- */

.info {
  margin-top: 24px;
}

#social-providers ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

#social-providers a {
  display: block;
  margin-bottom: 8px;
  padding: 12px;
  border: 1px solid var(--field-border);
  border-radius: 12px;
  text-align: center;
  font-size: 14px;
  color: var(--default);
  text-decoration: none;
  transition: border-color 0.2s;
}

#social-providers a:hover {
  border-color: var(--default);
}

/* ---- Responsive ---- */

@media (max-width: 900px) {
  .right-panel {
    display: none;
  }

  .left-panel {
    width: 100%;
    padding: 32px 24px 24px;
  }

  .form-container {
    width: 100%;
    max-width: 420px;
  }
}
