:root {
  /* Colors */
  --uap-primary: #da2128;
  --uap-accent: #1c4387;
  --uap-text: #2d2330;
  --uap-text-light: #736d75;
  --uap-placeholder: #7f7f7f;
  --uap-border: #e1e1e1;
  --uap-box-border: #faf5ee;
  --uap-success-bg: #e4fce5;
  --uap-error-bg: #fce4e5;

  /* Spacing */
  --uap-field-padding-x: 26px;
  --uap-field-padding-y: 18px;
  --uap-icon-gap: 18px;
  --uap-box-padding: 65px;
  --uap-heading-gap: 40px;
  --uap-alert-padding-x: 40px;
  --uap-alert-padding-y: 30px;
  --uap-button-padding-x: 30px;
  --uap-button-padding-y: 16px;

  /* Border Radius */
  --uap-border-radius: 10px;
  --uap-button-radius-lg: 30px;
}

/* Form Container */
.uap-form-container {
  max-width: 630px;
  margin: 0 auto;
}

.uap-form {
  background: #fff;
  padding: var(--uap-box-padding);
  border: 1px solid var(--uap-box-border);
  box-shadow: 0px 6px 40px rgba(0, 0, 0, 0.06);
  border-radius: var(--uap-border-radius);
}

.uap-form-title {
  font-size: 24px;
  color: var(--uap-text);
  margin: 0 0 var(--uap-heading-gap);
}

/* Form Fields */
.uap-form-row {
  margin-bottom: 20px;
  position: relative;
}

.uap-form-row-split {
  display: flex;
  gap: 20px;
}

.uap-form-col {
  flex: 1;
  position: relative;
}

.uap-form-row label {
  display: block;
  margin-bottom: 8px;
  color: var(--uap-text);
  font-weight: 500;
}

.uap-form-row svg,
.uap-form-col svg {
  position: absolute;
  left: var(--uap-field-padding-x);
  top: 50%;
  transform: translateY(-50%);
  color: var(--uap-placeholder);
  transition: color 0.2s ease;
  pointer-events: none;
}

.uap-form-row input[type="text"],
.uap-form-row input[type="email"],
.uap-form-row input[type="password"],
.uap-form-row input[type="tel"] {
  width: 100%;
  padding: var(--uap-field-padding-y) var(--uap-field-padding-x);
  padding-left: calc(var(--uap-field-padding-x) + 24px + var(--uap-icon-gap));
  border: 1px solid var(--uap-border);
  border-radius: var(--uap-border-radius);
  font-size: 16px;
  letter-spacing: -0.01em;
  color: var(--uap-text);
  transition: all 0.2s ease;
}

.uap-form-row input::placeholder {
  color: var(--uap-placeholder);
  font-size: 16px;
  letter-spacing: -0.01em;
}

/* Hover & Focus States */
.uap-form-row input:hover {
  border-color: var(--uap-primary);
}

.uap-form-row input:focus {
  border-color: var(--uap-primary) !important;
  outline: none;
}

.uap-form-row input:hover::placeholder,
.uap-form-row input:focus::placeholder {
  color: var(--uap-primary);
}

.uap-form-row input:hover + svg,
.uap-form-row input:focus + svg {
  color: var(--uap-primary);
}

/* Form Messages */
.uap-form-messages {
  max-width: 630px;
  margin: 0 auto 40px;
}

.uap-message {
  text-align: center;
  padding: var(--uap-alert-padding-y) var(--uap-alert-padding-x);
  border-radius: var(--uap-border-radius);
  color: var(--uap-text);
}

.uap-message.error {
  background-color: var(--uap-error-bg);
}

.uap-message.success {
  background-color: var(--uap-success-bg);
}

/* Button Styles */
.uap-button {
  width: 100%;
  padding: var(--uap-button-padding-y) var(--uap-button-padding-x) !important;
  border: none;
  border-radius: var(--uap-button-radius-lg);
  cursor: pointer;
  font-size: 16px;
  letter-spacing: -0.01em;
  transition: opacity 0.3s ease;
}

.uap-button.primary {
  background: var(--uap-primary);
  color: #fff;
  box-shadow: 0px 15px 30px 0px rgba(218, 32.99999999999999, 40.00000000000017, 0.35);
  border: 1px solid var(--uap-primary) !important;
}

.uap-button.primary:hover {
  background-color: #c7151c;
  box-shadow: 0px 15px 30px 0px rgba(218, 32.99999999999999, 40.00000000000017, 0.55);
  border: 1px solid #c7151c !important;
}

.uap-button.accent {
  background: var(--uap-accent);
  color: #fff;
  box-shadow: 0px 15px 30px 0px rgba(28, 67, 135, 0.35);
  border: 1px solid var(--uap-accent) !important;
}

.uap-button.accent:hover {
  background-color: #123470;
  box-shadow: 0px 15px 30px 0px rgba(28, 67, 135, 0.55);
}

/* Form Links */
.uap-form-links {
  margin-top: 20px;
  text-align: center;
}

.uap-form-links a {
  color: var(--uap-primary);
  text-decoration: none;
  font-size: 14px;
}

.uap-form-links a:hover {
  text-decoration: underline;
}

/* Loading States */
.uap-form-loading {
  position: relative;
}

.uap-form-loading:before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.8);
  z-index: 1;
}

.uap-form-loading:after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid #ccc;
  border-top-color: #333;
  border-radius: 50%;
  animation: uap-spin 1s linear infinite;
  z-index: 2;
}

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

/* Validation Errors */
.uap-field-error {
  border-color: #d63638 !important;
}

.uap-error {
  color: #d63638;
  font-size: 12px;
  margin-top: 5px;
  display: block;
}

/* Checkbox Styles */
.uap-form-checkbox {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
}

.uap-form-checkbox label {
  display: flex;
  align-items: center;
  font-weight: 500;
  text-rendering: geometricPrecision;
  color: #736d75;
  cursor: pointer;
}

.uap-form-checkbox input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border: 1px solid #ebe6de;
  border-radius: 4px;
  margin: 0 10px 0 0;
  cursor: pointer;
  position: relative;
  background: #fff;
}

.uap-form-checkbox input[type="checkbox"]:checked {
  background: var(--uap-accent);
  border-color: var(--uap-accent);
}

.uap-form-checkbox input[type="checkbox"]:checked:after {
  content: "";
  position: absolute;
  left: 6px;
  top: 2px;
  width: 6px;
  height: 12px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.uap-form-checkbox input[type="checkbox"]:hover,
.uap-form-checkbox input[type="checkbox"]:focus {
  border-color: var(--uap-accent) !important;
}

/* Remember Me and Forgot Password Row */
.uap-form-remember-forgot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 30px;
  margin-bottom: 0;
}

.uap-form-checkbox {
  margin-bottom: 0;
}

.uap-forgot-link {
  color: var(--uap-text-light) !important;
  text-decoration: underline !important;
  font-size: 16px;
  font-weight: 500;
  text-rendering: geometricPrecision;
}

.uap-forgot-link:hover {
  color: var(--uap-primary) !important;
}

/* Submit Button Spacing */
.uap-form-submit {
  margin-top: 40px;
  text-align: center;
}
