
form * {
  box-sizing: border-box;
}

/* form .text-danger{
  background-color: #F9DBD9; 
  border: 1px solid #ffe6e6; 
  color: var(--text-danger);
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  margin: 5px 0;            
  position: relative;
  padding-left: 40px;
} */

/* form .text-danger::before {
  content: "";
  width: 16px;
  height: 16px;
  margin-right: 10px;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%23991b1b" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"></circle><line x1="12" y1="8" x2="12" y2="12"></line><line x1="12" y1="16" x2="12.01" y2="16"></line></svg>');
  background-size: contain;
  background-repeat: no-repeat;
} */

/* 1. Reset the span to be invisible by default */
span[data-valmsg-for="Common"] {
    display: none;
    transition: all 0.2s ease-in-out;
}

/* 2. Apply styles ONLY when the span contains text */
span[data-valmsg-for="Common"]:not(:empty) {
    display: block;
    position: relative;
    color: #991b1b;            /* Dark red text */
    padding: 6px 12px 6px 40px; /* Extra left padding for the icon */
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.4;
}

/* 3. The Icon via pseudo-class */
span[data-valmsg-for="Common"]:not(:empty)::before {
    content: "";
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%23991b1b" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"></circle><line x1="12" y1="8" x2="12" y2="12"></line><line x1="12" y1="16" x2="12.01" y2="16"></line></svg>');
    background-size: contain;
    background-repeat: no-repeat;
}
.form-field {
  margin-bottom: 16px;
  text-align: left;
  transition: all 0.15s ease;
}


.form-field > label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-tertiary);
}

.social-links > label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-tertiary);
}

/* for flex input-field (message box) */
.input-container {
  position: relative;
  display: flex;
  align-items: center;
  transition: all 0.3s ease;
}

.input-container textarea:focus{
  outline: none;
  border-color: none !important;
  box-shadow: none !important;
}
.password-container {
    position: relative;
}



.form-field input[type="text"],
.form-field input[type="number"],
.form-field input[type="email"],
.form-field input[type="password"],
.form-field input[type="tel"],
.form-field input[type="datetime-local"],
.form-field input[type="datetime"],
.form-field input[type="url"],
.form-field textarea,
.form-field select {
  width: 100%;
  padding: 12px 18px;
  font-family: var(--font-primary);
  font-size: 14px;
  border-radius: 25px;
  border: var(--border-secondary);
  background: var(--bg-secondary);
  color: var(--text-secondary);
  transition: all 0.15s ease;
}


.form-field textarea {
  resize: vertical;
  min-height: 100px;
}


.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
  outline: none;
  border-color: var(--bg-accent-3);
  box-shadow: 0 0 0 3px rgba(30, 220, 233, 0.12);
}


.form-field input::placeholder,
.form-field textarea::placeholder {
  color: var(--text-muted);
  opacity: 1;
}

/*    CHECKBOX / RADIO */
.form-field input[type="checkbox"],
.form-field input[type="radio"] {
  accent-color: var(--bg-accent-3);
  cursor: pointer;
}

/*  FILE INPUT */
.form-field input[type="file"]::file-selector-button {
  font-family: var(--font-primary);
  padding: 8px 14px;
  border-radius: 28px;
  border: var(--border-primary);
  background: var(--bg-primary-gradient);
  color: var(--text-inverse);
  cursor: pointer;
}

/*    INLINE LABEL (CHECKBOX + TEXT) */
.form-field .form-inline-label {
  display: flex;
  align-items: center;
  gap: 8px;
}

/*    SUFFIX ICON (PASSWORD EYE, INFO ICON) */
.form-field .suffix-icon {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
  cursor: pointer;
  line-height: 1
}


.social-links input {
  width: 100%;
  padding: 0;
  border: none;
  background: transparent;
  font-size: 13px;
  color: var(--text-secondary);
}
.social-links input[type="text"]{
  padding: 0;
  font-family: var(--font-primary);
  border-radius: 0px;
  border: none;
}
.form-field input:focus {
  outline: none;
  box-shadow: none;
}

.form-field.auth-link{
  text-align: center;
  margin-block: 8px;
}

.form-field.auth-link a{
  color: var(--text-primary);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
}



/*    FORM CONSENT */
.form-consent {
  margin: 15px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.form-consent label {
  color: var(--text-secondary);
  margin-bottom: 0;
}

.form-consent a {
  color: var(--text-primary);
  text-decoration: none;
}


/*   OTP / CODE INPUTS */
.code-inputs {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 15px;
}

.code-inputs .code-input {
  width: 40px;
  height: 40px;
  border: var(--border-secondary);
  border-radius: 6px;
  text-align: center;
  font-size: 20px;
  font-weight: bold;
  color: var(--text-tertiary);
  outline: none;
  transition: all 0.2s ease;
}

.code-input:focus {
  border-color: var(--bg-accent-3);
  box-shadow: 0 0 0 3px rgba(30, 220, 233, 0.12);
}




/* LOGIN SECTION */
.login-section form {
  margin-top: 8px;
  padding: 40px 30px 20px;
  background: #fff;
  border: var(--border-light);
  box-shadow: var(--shadow-tertiary);
  border-radius: 20px;
}

.login-section form.form-external-account{
  text-align: center;
  padding: 10px 30px;
  background: none;
  border: none;
  box-shadow: none;
  width: 100%;
}
.login-section .oauth-wrapper{
  display: flex;
  flex-direction: column;
  align-items: center;
}

.login-section .divider {
  position: relative;
  margin-block: 5px;
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 400;
  width: fit-content;
}

.login-section .divider::before {
  content: '';
  position: absolute;
  left: -40px;
  top: 50%;
  width: 30px;
  height: 1px;
  background-color: var(--text-neutral);
  transform: translateY(-50%);
}

.login-section .divider::after {
  content: '';
  position: absolute;
  right: -40px;
  top: 50%;
  width: 30px;
  height: 1px;
  background-color: var(--text-neutral);
  transform: translateY(-50%);
}
.login-section .help-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  /* margin-bottom: 18px; */
}

.login-section .forgot {
  font-size: 13px;
  color: var(--text-primary);
  text-decoration: underline;
  text-decoration-thickness: 0.5px;
  text-underline-offset: 5px;
  font-weight: 500;
}

.login-section .flex-row{
  display: flex;
  justify-content: space-between;
}

/*    CAPTCHA   */
.recaptcha {
  margin-top: 10px;
  margin-bottom: 24px;
}

/*    RESPONSIVE */
@media (max-width: 768px) {
  .form-field,
  .recaptcha {
    margin-bottom: 10px;
    margin-top: 10px;
  }
}

@media (max-width: 420px) {
  .login-section form {
    margin-top: 8px;
    padding: 15px;
    background: #fff;
    border: var(--border-light);
    box-shadow: var(--shadow-tertiary);
    border-radius: 20px;
  }
  
  .login-section .flex-row{
    flex-direction: column;
  }
}






/* Pages Specific Styles for form */

.profile-form-container .crp-cnt .form-consent{
  border-bottom: var(--border-muted);
  padding-bottom: 15px;
}