/* ===== Reset & Base ===== */
*, *::before, *::after {
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: 'Open Sans', Helvetica, Arial, sans-serif;
}

input, select, button, textarea {
  font-family: inherit;
}

/* ===== Mobile Form Page ===== */

.mobile-form {
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  min-height: 100vh;
  background-color: #ffffff;
  display: flex;
  flex-direction: column;
}

/* --- Header (white area with logos) --- */
.form-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5vw 4.5vw 4vw;
  background-color: #ffffff;
}

.logo-spearbio {
  flex-shrink: 0;
}

.logo-spearbio img {
  height: clamp(22px, 6vw, 36px);
  width: auto;
  display: block;
}

.logo-biotechne {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  flex-shrink: 0;
}

.logo-biotechne .biotechne-text {
  font-size: clamp(7px, 2vw, 11px);
  font-weight: 400;
  color: #0033A0;
  line-height: 1;
  margin-bottom: 2px;
}

.logo-biotechne img {
  height: clamp(22px, 6vw, 36px);
  width: auto;
  display: block;
}

/* --- Content area (#F6FAFC background) --- */
.form-content {
  flex: 1;
  background-color: #F6FAFC;
  padding: 6vw 4.5vw 10vw;
}

.form-title {
  font-weight: 800;
  font-size: clamp(16px, 4.8vw, 24px);
  color: #0B3954;
  margin: 0 0 2vw 0;
  line-height: 1.3;
}

.form-subtitle {
  font-weight: 400;
  font-size: clamp(11px, 3.3vw, 16px);
  color: #1794BA;
  margin: 0 0 6vw 0;
  line-height: 1.4;
}

/* --- Form inputs --- */
.form-group {
  margin-bottom: 4vw;
}

.form-group input,
.form-group select {
  width: 100%;
  height: clamp(38px, 10.8vw, 52px);
  padding: 0 3.5vw;
  font-weight: 400;
  font-size: clamp(12px, 3.3vw, 16px);
  color: #333333;
  background-color: #ffffff;
  border: 1px solid #1794BA;
  border-radius: clamp(6px, 1.8vw, 10px);
  outline: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  transition: box-shadow 0.2s ease;
}

.form-group input::placeholder {
  color: rgba(0, 0, 0, 0.30);
}

.form-group input:focus,
.form-group select:focus {
  box-shadow: 0 0 0 2px rgba(23, 148, 186, 0.25);
}

/* --- Custom Select Dropdown --- */
.custom-select-wrapper {
  position: relative;
  margin-bottom: 4vw;
}

.custom-select {
  position: relative;
  width: 100%;
}

.custom-select-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: clamp(38px, 10.8vw, 52px);
  padding: 0 3.5vw;
  font-weight: 400;
  font-size: clamp(12px, 3.3vw, 16px);
  color: rgba(0, 0, 0, 0.30);
  background-color: #ffffff;
  border: 1px solid #1794BA;
  border-radius: clamp(6px, 1.8vw, 10px);
  cursor: pointer;
  transition: box-shadow 0.2s ease, border-radius 0.2s ease;
}

.custom-select-trigger.has-value {
  color: #333333;
}

.custom-select.open .custom-select-trigger {
  box-shadow: 0 0 0 2px rgba(23, 148, 186, 0.25);
  border-radius: clamp(6px, 1.8vw, 10px) clamp(6px, 1.8vw, 10px) 0 0;
}

.custom-select-trigger .select-arrow {
  width: clamp(10px, 3vw, 16px);
  height: auto;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.custom-select.open .custom-select-trigger .select-arrow {
  transform: rotate(180deg);
}

.custom-select-value {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-right: 8px;
}

.custom-select-options {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background-color: #ffffff;
  border: 1px solid #1794BA;
  border-top: none;
  border-radius: 0 0 clamp(6px, 1.8vw, 10px) clamp(6px, 1.8vw, 10px);
  max-height: 200px;
  overflow-y: auto;
  z-index: 100;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

.custom-select.open .custom-select-options {
  display: block;
}

.custom-select-option {
  padding: 0 3.5vw;
  height: clamp(36px, 10vw, 48px);
  display: flex;
  align-items: center;
  font-size: clamp(11px, 3vw, 14px);
  font-weight: 400;
  color: #333333;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.custom-select-option:hover {
  background-color: #F6FAFC;
}

.custom-select-option.selected {
  background-color: #1794BA;
  color: #ffffff;
  font-weight: 600;
}

/* --- Submit button --- */
.submit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 7vw;
  height: clamp(38px, 10.8vw, 52px);
  margin-top: 2vw;
  font-weight: 700;
  font-size: clamp(13px, 3.8vw, 18px);
  color: #ffffff;
  background-color: #FF6600;
  border: none;
  border-radius: clamp(8px, 2.7vw, 14px);
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.1s ease;
  line-height: 1;
}

.submit-btn:hover {
  background-color: #e65c00;
}

.submit-btn:active {
  transform: scale(0.97);
}

/* --- Success / Download page --- */
.success-content {
  display: flex;
  flex-direction: column;
}

.download-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 7vw;
  height: clamp(38px, 10.8vw, 52px);
  margin-top: 2vw;
  font-weight: 700;
  font-size: clamp(13px, 3.8vw, 18px);
  color: #ffffff;
  background-color: #FF6600;
  border: none;
  border-radius: clamp(8px, 2.7vw, 14px);
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.1s ease;
  line-height: 1;
  text-decoration: none;
  width: fit-content;
}

.download-btn:hover {
  background-color: #e65c00;
  color: #ffffff;
}

.download-btn:active {
  transform: scale(0.97);
}

/* --- Alerts --- */
.spear-alert {
  padding: 2.5vw 3.5vw;
  border-radius: clamp(6px, 1.8vw, 10px);
  font-size: clamp(11px, 3vw, 14px);
  font-weight: 600;
  margin-bottom: 4vw;
  text-align: center;
}

.spear-alert-error {
  background: #fee2e2;
  color: #dc2626;
  border: 1px solid #fca5a5;
}

.spear-alert-success {
  background: #d1fae5;
  color: #059669;
  border: 1px solid #6ee7b7;
}

/* --- Desktop: center the mobile form as a card --- */
@media (min-width: 600px) {
  body {
    background-color: #f0f2f5;
  }

  .mobile-form {
    margin: 0 auto;
    min-height: 100vh;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.08);
  }

  .form-header {
    padding: 24px 28px 20px;
  }

  .form-content {
    padding: 32px 28px 48px;
  }

  .form-group {
    margin-bottom: 18px;
  }

  .form-group input,
  .form-group select {
    padding: 0 16px;
  }

  .custom-select-trigger {
    padding: 0 16px;
  }

  .custom-select-option {
    padding: 0 16px;
  }

  .submit-btn,
  .download-btn {
    padding: 0 36px;
  }
}