/* 
 * Customer Form Styles 
 */

#customer-form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
}

#customer-form .form-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

#customer-form .form-section,
#customer-form .form-footer {
  max-width: 620px;
}

#customer-form .form-section .form-row {
  display: flex;
  flex-direction: row;
  gap: 12px;
  width: 100%;
}

@media (max-width: 420px) {
  #customer-form .form-section .form-row {
    flex-direction: column;
  }
}

#customer-form .form-section .form-row>div {
  width: 100%;
}

#customer-form .form-section .form-row .form-field {
  width: 100%;
  flex-grow: 1;
}

#customer-form .form-section .form-row .form-field.title-field {
  flex: 1 0 20%;
  max-width: 100px;
}

/* Message at the top when creating account */
section.register-form>p {
  text-align: center;
  margin-bottom: 16px;
}

/* Form field layout: label above input, full width */
#customer-form .form-group.row {
  display: flex;
  flex-direction: column;
  margin: 0;
  width: 100%;
  gap: 4px;
}

#customer-form .form-group.row .form-control-label {
  width: 100%;
  padding: 0 16px;
  margin: 0;
  text-align: left;
  font-size: 14px;
  line-height: 15px;
}

#customer-form .form-group.row .js-input-column {
  width: 100%;
  padding: 0;
}

#customer-form .form-group.row .js-input-column input,
#customer-form .form-group.row .js-input-column .form-control-select {
  padding: 8px 16px;
  border-radius: 32px;
  border: 1px solid var(--color-primary);
  background: var(--color-white);
  color: var(--color-black);
  font-size: 16px;
  line-height: 17px;
}

/* Fix select input height */
#customer-form select.form-control:not([size]):not([multiple]) {
  height: 100%;
}

/* Left align date on iPhone */
#customer-form input::-webkit-date-and-time-value {
  text-align: left;
}

#customer-form input[type="date"] {
  -webkit-appearance: none;
  appearance: none;
}

/* Hide all comment sections (Optional text and field descriptions) */
#customer-form .form-control-comment {
  display: none;
}

/* Add red asterisk for required fields (those that don't have "Optional" in comments) */
#customer-form .form-control-label.required::after {
  content: " *";
  color: var(--color-error);
}

/* For checkboxes, hide the asterisk on the empty label and add it after the checkbox text */
#customer-form .form-group:has(.custom-checkbox) .form-control-label.required::after {
  display: none;
}

#customer-form .custom-checkbox label:has(input[required])::after {
  content: " *";
  color: var(--color-error);
}




/* 
 * Login page
 */

#authentication #content {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 32px 16px;
  max-width: unset;
  border: none;
}

#login-form,
#login-form>div {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

#login-form div.form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  justify-content: flex-start;
  width: fit-content;
  margin: 0;
}

#login-form div.form-group::after {
  display: none;
}

#login-form div.form-group .form-control-comment {
  display: none;
}

#login-form div.form-group label {
  margin: 0;
  padding: 0 16px;
  font-size: 14px;
  line-height: 15px;
  color: var(--color-black);
  text-align: start;
  width: 100%;
}

#login-form div.form-group .input-group-btn,
#customer-form div.form-group .input-group-btn {
  display: flex;
  align-items: center;
}

#login-form div.form-group .input-group-btn button,
#customer-form div.form-group .input-group-btn button {
  padding: 4px 12px;
  font-size: 14px;
  line-height: 15px;
  border-radius: 32px;
  background: var(--color-primary);
  height: fit-content;
}

#login-form div.form-group .js-input-column {
  padding: 0;
  width: 340px;
}

#login-form div.form-group .input-group,
#customer-form div.form-group .input-group {
  gap: 12px;
}

#login-form div.form-group .js-input-column input {
  border-radius: 32px;
  padding: 8px 16px;
  font-size: 16px;
  line-height: 17px;
  color: var(--color-black);
  background: var(--color-white);
}

#login-form .help-block,
#login-form .help-block ul,
#login-form .help-block li {
  margin: 0;
}

#login-form .help-block li {
  padding: 0;
  background: transparent;
  color: var(--color-error);
  border: none;
  font-size: 14px;
  line-height: 15px;
  font-weight: 600;
}

#login-form hr {
  width: 40vw;
}




/* 
* Addresses
*/
.js-address-form form {
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 100%;
}

.js-address-form form .block-address-selection {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.address-selector.js-address-selector {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 12px;
  flex: 50% 50%;
}

body#checkout section.checkout-step .add-address {
  margin: 0;
}

.js-address-form form .different-billing-address {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
}

/* Address card selector */
article.address-item {
  border: 1px solid transparent;
  border-radius: 32px;
  padding: 18px 24px;
  background-color: var(--color-white);
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0 !important;
  width: 100%;
  min-width: 250px;
  flex: 1 0 48%;
}


article.address-item.selected {
  border-color: var(--color-primary);
}

article.address-item .radio-block {
  display: flex;
  align-items: center;
  flex-direction: row;
  gap: 12px;
  padding: 0 !important;
  margin: 0;
  width: 100%;
}

article.address-item .radio-block input[type="radio"] {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border: 1px solid var(--color-black-light);
  background-color: var(--color-white-light);
  border-radius: 50%;
  cursor: pointer;
}
article.address-item .radio-block input[type="radio"]:checked::after {
  content: "";
  display: block;
  width: 12px;
  height: 12px;
  margin: 2px;
  border-radius: 50%;
  background-color: var(--color-primary);
}

article.address-item .radio-block .address-alias {
  margin: 0 !important;
  width: 100%;
}

article.address-item .address-content .address {
  color: var(--color-black);
}


/* Address card footer */
article.address-item .address-footer {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  padding: 0 !important;
}

article.address-item .address-footer a {
  display: flex !important;
  flex-direction: row;
  align-items: center;
  gap: 4px;
  margin: 0 !important;
}