/* Global Reset & Base Styles */
* {
  font-family: -apple-system, BlinkMacSystemFont, "San Francisco", Helvetica, Arial, sans-serif;
  font-weight: 300;
  margin: 0;
  box-sizing: border-box;
}

html, body {
  height: 100vh;
  width: 100vw;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f3f2f2;
}

/* Typography */
h4 {
  font-size: 24px;
  font-weight: 600;
  color: #000;
  opacity: 0.85;
}

label {
  font-size: 12.5px;
  color: #000;
  opacity: 0.8;
  font-weight: 400;
}

/* Form Container */
form {
  padding: 40px 30px 20px;
  background: #fff;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  max-width: 400px;
}

form h4 {
  margin-bottom: 20px;
  color: rgba(0, 0, 0, 0.5);
}

form h4 span {
  color: #000;
  font-weight: 700;
}

form p {
  line-height: 155%;
  font-size: 14px;
  color: #000;
  opacity: 0.65;
  font-weight: 400;
  max-width: 280px;
  margin: 0 0 20px 0;
}

/* Layout rows */
.name-row {
  display: flex;
  gap: 20px;
  margin-bottom: 0.5rem;
}

.name-row .field-wrapper,
.name-row .floating-label {
  flex: 1;
  display: flex;
  align-items: center;
  position: relative;
  flex-direction: row;
}

/* Input Fields */
/* Target only text, email, and password inputs */
input[type="text"],
input[type="email"],
input[type="password"] {
  font-size: 16px;
  padding: 20px 0;
  height: 56px;
  border: none;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  background: #fff;
  width: 100%;
  box-sizing: border-box;
  transition: all 0.3s linear;
  color: #000;
  font-weight: 400;
  -webkit-appearance: none;
}

input[type="checkbox"] {
  width: auto;
  height: auto;
  margin-right: 10px;
  accent-color: #a283f0; /* Bootstrap 5 supports accent-color */
}

input:focus {
  border-bottom: 1px solid rgb(182, 157, 230);
  outline: 0;
  box-shadow: 0 2px 6px -8px rgba(182, 157, 230, 0.45);
}

/* Floating Labels */
.floating-label {
  position: relative;
  margin-bottom: 10px;
  width: 100%;
}

.floating-label label {
  position: absolute;
  top: calc(50% - 7px);
  left: 0;
  opacity: 0;
  transition: all 0.3s ease;
}

.floating-label input:not(:placeholder-shown) {
  padding: 28px 0 12px 0;
}

.floating-label input:not(:placeholder-shown) + label {
  transform: translateY(-10px);
  opacity: 0.7;
}

/* Error Inline */
.error-inline {
  margin-left: 10px;
  color: #e74a3b;
  font-size: 0.85rem;
  white-space: nowrap;
}

/* Buttons */
button,
input[type="submit"] {
  appearance: none;
  min-width: 100px;
  border-radius: 24px;
  text-align: center;
  padding: 15px 40px;
  margin-top: 5px;
  background-color: rgb(202, 174, 255);
  color: #fff;
  font-size: 14px;
  margin-left: auto;
  font-weight: 500;
  box-shadow: 0 2px 6px -1px rgba(0, 0, 0, 0.13);
  border: none;
  transition: all 0.3s ease;
  outline: 0;
}

button:hover,
input[type="submit"]:hover {
  transform: translateY(-3px);
  box-shadow: 0 2px 6px -1px rgba(182, 157, 230, 0.65);
}

button:active,
input[type="submit"]:active {
  transform: scale(0.99);
}

/* Form Check (Checkbox) */
.form-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 16px;
}

input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  margin-right: 8px;
  cursor: pointer;
  appearance: auto;
  -webkit-appearance: checkbox;
  accent-color: rgb(202, 174, 255);
}

.form-check-label {
  font-size: 13px;
  color: #000;
  font-weight: 400;
  line-height: 1.4;
}

/* Utility Links */
a.discrete {
  color: rgba(0, 0, 0, 0.4);
  font-size: 14px;
  border-bottom: 1px solid transparent;
  padding-bottom: 4px;
  margin-left: auto;
  font-weight: 300;
  transition: all 0.3s ease;
  margin-top: 40px;
}

a.discrete:hover {
  border-bottom: 1px solid rgba(0, 0, 0, 0.2);
}

/* Form layout wrapper */
.session {
  display: flex;
  flex-direction: row;
  max-width: 900px;
  width: 100%;
  margin: auto;
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 2px 6px -1px rgba(0, 0, 0, 0.12);
  overflow: hidden;
  flex-wrap: wrap;
}

/* Left Image Panel */
.left {
  flex: 1 1 250px;
  min-height: 300px;
  background-image: url("https://images.pexels.com/photos/114979/pexels-photo-114979.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940");
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.left svg {
  height: 40px;
  width: auto;
  margin: 20px;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .session {
    flex-direction: column;
    align-items: center;
  }

  .left {
    width: 100%;
    height: 200px;
    border-radius: 0;
  }

  form {
    max-width: 100%;
    padding: 20px;
  }

  .field-wrapper,
  .name-row {
    flex-direction: column;
  }

  .error-inline {
    margin-left: 0;
    margin-top: 3px;
    align-self: flex-start;
  }
}
