/* ============================================================
   Travel Innovation Group – New Starter Form
   style.css  |  Font: Roboto
   ============================================================ */

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

body {
  font-family: 'Roboto', sans-serif;
  font-weight: 400;
  background: #0d4a45;
  color: #333333;
  min-height: 100vh;
  padding: 40px 20px 60px;
  position: relative;
  overflow-x: hidden;
}

/* ── Decorative background rings ──────────────── */
body::before,
body::after {
  content: '';
  position: fixed;
  border-radius: 50%;
  border: 28px solid rgba(255,255,255,0.07);
  pointer-events: none;
  z-index: 2;
}

body::before {
  width: 1500px;
  height: 1500px;
  top: 600px;
  right: -260px;
}

body::after {
  width: 1500px;
  height: 1500px;
  bottom: 350px;
  left: -260px;
}
/* ── End decorative rings ─────────────────────── */

/* ── Page wrapper ─────────────────────────────── */
.page-wrapper {
  max-width: 520px;
  margin: 0 auto;
 position: relative;
  z-index: 1;
  isolation: isolate;
  background: rgba(255, 255, 255, 0.30);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-radius: 24px;
  border: 1px solid rgba(255,255,255,0.22);
  padding: 36px 40px 48px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.25);
}

/* ── Logo ─────────────────────────────────────── */
.logo-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin-bottom: 28px;
}

.logo-svg {
  width:200px;
  height: 175px;
}

.logo-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.25;
}

.logo-text span {
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: #444;
}



.page-subtitle {
  text-align: center;
  font-size: 25px;
  font-weight: 200;
  color: rgb(255, 255, 255);
  margin-bottom: 36px;
}

/* ── Form groups ──────────────────────────────── */
.form-group {
  margin-bottom: 30px;
}

label {
  display: block;
  font-size: 0.83rem;
  font-weight: 400;
  color: rgba(255,255,255,0.80);
  margin-bottom: 14px;
}

/* ── Text inputs ──────────────────────────────── */
input[type="text"],
input[type="email"],
input[type="tel"],
textarea {
  display: block;
  width: 100%;
  font-family: 'Roboto', sans-serif;
  font-size: 0.80rem;
  color: #464646;
  background: #ebebeb;
  border: none;
  border-radius: 24px;
  padding: 9px 12px;
  outline: none;
  transition: background 0.15s;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
textarea:focus {
  background: #e0e0e0;
}

input::placeholder {
  color: #999;
}

textarea {
  resize: vertical;
  min-height: 110px;
  background: #e0e0e0;
}

/* ── Selects ──────────────────────────────────── */
.select-wrapper {
  position: relative;
}

select {
  display: block;
  width: 100%;
  font-family: 'Roboto', sans-serif;
  font-size: 0.70rem;
  color: #8d8d8d;
  background: #ebebeb;
  border-radius: 24px;
  padding: 9px 32px 9px 12px;
  appearance: none;
  -webkit-appearance: none;
  outline: none;
  border: none;
  cursor: pointer;
  transition: background 0.15s;
}

select:focus {
  background: #e0e0e0;
}

select:disabled {
  color: #aaa;
  cursor: default;
  background: #f0f0f0;
}

.chevron {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-52%);
  font-size: 1.1rem;
  color: #888;
  pointer-events: none;
  line-height: 1;
}

/* ── Date field ───────────────────────────────── */
.date-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.date-wrapper input[type="text"] {
  padding-right: 36px;
  cursor: pointer;
}

.cal-icon-btn {
  position: absolute;
  right: 8px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  color: #888;
  transition: color 0.15s;
}

.cal-icon-btn:hover {
  color: #444;
}

.cal-icon-btn svg {
  width: 16px;
  height: 16px;
}

/* ── Calendar popup ───────────────────────────── */
.calendar-popup {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 200;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 6px;
  box-shadow: 0 6px 24px rgba(0,0,0,0.12);
  padding: 12px;
  width: 256px;
  animation: fadeDown 0.14s ease;
}

.calendar-popup.open {
  display: block;
}

@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.cal-header span {
  font-size: 0.85rem;
  font-weight: 500;
  color: #333;
}

.cal-nav {
  background: none;
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
  color: #555;
  line-height: 1;
  padding: 2px 6px;
  border-radius: 4px;
  transition: background 0.12s;
}

.cal-nav:hover {
  background: #f0f0f0;
}

.cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  margin-bottom: 4px;
}

.cal-weekdays span {
  text-align: center;
  font-size: 0.7rem;
  font-weight: 500;
  color: #888;
  padding: 3px 0;
}

.cal-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

.cal-day {
  text-align: center;
  font-size: 0.78rem;
  padding: 5px 2px;
  border-radius: 4px;
  cursor: pointer;
  color: #333;
  transition: background 0.1s;
  border: none;
  background: none;
  font-family: 'Roboto', sans-serif;
}

.cal-day:hover {
  background: #ebebeb;
}

.cal-day.today {
  font-weight: 700;
  color: #1a56db;
}

.cal-day.selected {
  background: #1a56db;
  color: #fff;
}

.cal-day.other-month {
  color: #ccc;
}

.cal-day.empty {
  cursor: default;
}

/* ── Checkbox row ─────────────────────────────── */
.checkbox-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-bottom: 18px;
  margin-top: 4px;
}

.cb-text {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.80);
}

.cb-label {
  position: relative;
  display: flex;
  align-items: center;
  cursor: pointer;
}

.cb-label input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.cb-box {
  display: inline-block;
  width: 15px;
  height: 15px;
  border: 1.5px solid #aaa;
  border-radius: 2px;
  background: #fff;
  transition: border-color 0.15s, background 0.15s;
  flex-shrink: 0;
}

.cb-label input[type="checkbox"]:checked + .cb-box {
  background: #1a56db;
  border-color: #1a56db;
}

.cb-label input[type="checkbox"]:checked + .cb-box::after {
  content: '';
  display: block;
  width: 4px;
  height: 8px;
  border: 2px solid #fff;
  border-top: none;
  border-left: none;
  transform: rotate(45deg) translate(1px, -1px);
  margin: 1px auto 0;
}

/* ── Work Email ───────────────────────────────── */
.email-wrapper {
  display: flex;
  align-items: center;
  gap: 0;
}

.email-wrapper input[type="text"] {
  width: 50%;
  border-radius: 24px;
  border-right: none;
  margin-right: 5px;

}

.email-domain-select {
  width: 50%;
  font-family: 'Roboto', sans-serif;
  font-size: 0.88rem;
  color: #555;
  background: #e0e0e0;
  border: none;
  border-radius: 24px;
  padding: 9px 28px 9px 8px;
  appearance: none;
  -webkit-appearance: none;
  outline: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 6px center;
  background-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.email-domain-select:focus {
  background-color: #d8d8d8;
}

/* ── Department select when split ────────────── */
#deptFlexContainer .select-wrapper {
  flex-shrink: 0;
}

#deptSubRoleWrapper .email-domain-select {
  width: 100%;
  font-size: 0.70rem;
  color: #8d8d8d;
  background: #ebebeb;
  border-radius: 24px;
  padding: 9px 28px 9px 12px;
}

.form-group.valid #deptFlexContainer .select-wrapper select,
.form-group.valid #deptSubRoleWrapper .email-domain-select {
  background: #e8f0fe;
  border: 1.5px solid #a0b4f0;
}

.form-group.error #deptFlexContainer .select-wrapper select,
.form-group.error #deptSubRoleWrapper .email-domain-select {
  background: #fff5f5;
  border: 2px solid #dc2626;
}
/* ── End Department select when split ─────────── */

/* ── End Work Email ───────────────────────────── */

/* ── Field States: Active, Valid, Error ───────── */

/* Blue highlight when a field is focused OR valid */
.form-group.valid input[type="text"],
.form-group.valid input[type="email"],
.form-group.valid input[type="tel"],
.form-group.valid textarea,
.form-group.valid select {
  background: #e8f0fe;
  border: 1.5px solid #a0b4f0;
  outline: none;
}

/* Red border when field is marked invalid on submit attempt */
.form-group.error input[type="text"],
.form-group.error input[type="email"],
.form-group.error input[type="tel"],
.form-group.error textarea,
.form-group.error select {
  background: #fff5f5;
  border: 2px solid #dc2626;
  outline: none;
}

/* Remove red once user starts correcting the field */
.form-group.error.valid input[type="text"],
.form-group.error.valid input[type="email"],
.form-group.error.valid input[type="tel"],
.form-group.error.valid textarea,
.form-group.error.valid select {
  background: #e8f0fe;
  border: 1.5px solid #a0b4f0;
}
/* ── End Field States ─────────────────────────── */

/* ── Validation Tick ──────────────────────────── */
.form-group {
  position: relative;
}

.valid-tick {
  display: none;
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  background: #16a34a;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  pointer-events: none;
}

.valid-tick svg {
  width: 9px;
  height: 9px;
  stroke: white;
  stroke-width: 2.5;
}

.form-group.valid .valid-tick {
  display: flex;
}

/* Push input/select/textarea text away from tick */
.form-group.valid input[type="text"],
.form-group.valid input[type="email"],
.form-group.valid input[type="tel"],
.form-group.valid textarea {
  padding-right: 34px;
}

/* Tick sits over the select arrow for dropdowns */
.form-group.valid .select-wrapper .valid-tick {
  right: 10px;
}

/* For date wrapper, tick sits to the right of the calendar icon */
.form-group.valid .date-wrapper .valid-tick {
  right: 44px;
}

/* For email field, tick sits inside the text portion */
.form-group.valid .email-wrapper .valid-tick {
  right: calc(25% + 10px);
}
/* ── Date Error Message ───────────────────────── */
.date-error-msg {
  display: none;
  font-size: 0.75rem;
  color: #f98a8a;
  margin-top: 4px;
}

.form-group.date-error .date-error-msg {
  display: block;
}

.form-group.date-error input[type="text"] {
  background: #fff5f5;
  border: 2px solid #dc2626;
}
/* ── End Date Error Message ───────────────────── */
/* ── End Validation Tick ──────────────────────── */
/* ── Submit row ───────────────────────────────── */
.submit-row {
  display: flex;
  justify-content: flex-end;
}

#submitBtn {
  font-family: 'Roboto', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  color: #0d4a45;
  background: rgba(255,255,255,0.88);
  border: none;
  border-radius: 20px;
  padding: 9px 28px;
  cursor: pointer;
  transition: background 0.15s;
}

#submitBtn:hover {
  background: rgba(255,255,255,1);
}

/* ── Responsive ───────────────────────────────── */
@media (max-width: 560px) {
  .page-title {
    font-size: 1.5rem;
  }
}
