.wp-block-edwiser-bridge-profile {
  // CSS reset
  *,
  *::before,
  *::after {
    box-sizing: border-box;
    font-family: 'Segoe UI', sans-serif;
  }

  * {
    margin: 0;
  }

  img,
  picture,
  video,
  canvas,
  svg {
    display: block;
    max-width: 100%;
  }

  input,
  button,
  textarea,
  select {
    font: inherit;
  }

  p,
  h1,
  h2,
  h3,
  h4,
  h5,
  h6 {
    overflow-wrap: break-word;
    margin: 0;
  }

  p {
    text-wrap: pretty;
  }
  h1,
  h2,
  h3,
  h4,
  h5,
  h6 {
    text-wrap: balance;
  }

  background: none !important;
  width: 100%;
  max-width: 100% !important;
  padding: 0 !important;
  margin: 0 auto !important;
  font-size: 1rem;
  line-height: 1.5rem;

  // Mantine password input
  .mantine-PasswordInput-root {
    width: 100%;
  }

  .mantine-PasswordInput-wrapper {
    position: relative;
  }

  .mantine-PasswordInput-section {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    color: #abbebe;
  }

  .mantine-PasswordInput-section[data-position='right'] {
    right: 12px;
    top: 50%;
    transform: translateY(-50%);

    button {
      width: 26px;
      height: 26px;
      min-width: 26px;
      min-height: 26px;
      line-height: 1;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      position: relative;
      user-select: none;
      overflow: hidden;
      border-radius: 4px;
      cursor: pointer;
      background-color: transparent;
      border: 0;
      padding: 0;
      appearance: none;
      font-size: 1rem;
      text-align: left;
      text-decoration: none;
      color: inherit;
      touch-action: manipulation;
      -webkit-tap-highlight-color: transparent;
      box-shadow: none;

      &:hover {
        background-color: hsl(183, 34%, 88%, 0.5);
      }

      svg {
        width: 15px !important;
        height: 15px !important;
      }
    }
  }

  .mantine-PasswordInput-label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    line-height: 20px;
    color: #283b3c;
    margin-bottom: 6px;

    .optional-label {
      font-weight: 400;
      font-size: 12px;
      line-height: 16px;
      color: #819596;
    }
  }

  .mantine-PasswordInput-innerInput {
    width: 100%;
    height: 36px;
    border: 1px solid #d6eaeb !important;
    border-radius: 4px !important;
    background: #fff;
    color: #283b3c;
    font-size: 14px;
    font-weight: 400;
    line-height: 20px;
    padding-inline: 12px;
    box-shadow: none;

    &::placeholder {
      font-size: 14px;
      font-weight: 400;
      line-height: 20px;
      color: #819596;
    }

    &:focus {
      outline: 1px solid #008b91 !important;
    }

    &[data-error='true'] {
      border: 1px solid #dd1405 !important;
      color: #dd1405;

      &::placeholder {
        color: #dd1405;
      }

      &:focus {
        outline: none;
        color: #dd1405;
      }
    }
  }

  .mantine-PasswordInput-error {
    font-weight: 600;
    font-size: 12px;
    line-height: 16px;
    color: #dd1405;
  }

  // Mantine textarea
  .mantine-Textarea-label {
    margin-bottom: 0.5em !important;
    font-weight: 600;
    font-size: 0.875rem;
    color: #273e3f;
    display: inline-block;
    word-break: break-word;
    cursor: default;
    -webkit-tap-highlight-color: transparent;

    .optional-label {
      font-weight: 400;
      font-size: 12px;
      line-height: 16px;
      color: #819596;
    }
  }

  .mantine-InputWrapper-required {
    color: #fa5252;
  }

  .mantine-Textarea-input {
    min-height: 80px !important;
    border: 1px solid #d6eaeb;
    border-radius: 4px;
    padding: 12px 10px;
    font-weight: 400;
    font-size: 0.875rem;
    color: #273e3f;
    -webkit-tap-highlight-color: transparent;
    appearance: none;
    resize: vertical;
    display: block;
    width: 100%;
    transition: border-color 100ms ease;
    text-align: left;
    background-color: #fff;
    min-height: 2.25rem;
    padding-inline: 10px;
    cursor: text;
    box-shadow: none;

    &:focus {
      outline: 1px solid #008b91;
    }
    &[data-error='true'] {
      border: 1px solid #dd1405 !important;
      color: #dd1405;

      &::placeholder {
        color: #dd1405;
      }

      &:focus {
        outline: none !important;
        color: #dd1405;
      }
    }
  }

  .mantine-Textarea-error {
    font-weight: 600;
    font-size: 12px;
    line-height: 16px;
    color: #dd1405;
  }

  // Mantine Skeleton
  .mantine-Skeleton-root {
    --mantine-scale: 1;
    height: var(--skeleton-height, auto);
    width: var(--skeleton-width, 100%);
    border-radius: 4px;
    position: relative;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);

    &:where([data-animate])::after {
      animation: skeleton-fade 1500ms linear infinite;
    }

    &:where([data-visible]) {
      overflow: hidden;

      &::before {
        position: absolute;
        content: '';
        inset: 0;
        z-index: 10;
        background-color: #fff !important;
      }

      &::after {
        position: absolute;
        content: '';
        inset: 0;
        z-index: 11;
        background-color: #dee2e6 !important;
      }
    }
  }

  @keyframes skeleton-fade {
    0%,
    100% {
      opacity: 0.4;
    }

    50% {
      opacity: 1;
    }
  }

  // Mantine Input
  .mantine-TextInput-root {
    position: relative;
  }

  .mantine-TextInput-section {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    color: #abbebe;
  }

  .mantine-TextInput-section[data-position='left'] {
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
  }

  .mantine-TextInput-label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    line-height: 20px;
    color: #283b3c;
    margin-bottom: 6px;

    .optional-label {
      font-weight: 400;
      font-size: 12px;
      line-height: 16px;
      color: #819596;
    }
  }

  .mantine-TextInput-input {
    width: 100%;
    height: 36px;
    border: 1px solid #d6eaeb !important;
    border-radius: 4px !important;
    background: #fff;
    color: #283b3c;
    font-size: 14px;
    font-weight: 400;
    line-height: 20px;
    padding-inline: 12px;
    box-shadow: none;

    &::placeholder {
      font-size: 14px;
      font-weight: 400;
      line-height: 20px;
      color: #819596;
    }

    &:focus {
      outline: 1px solid #008b91 !important;
    }

    &[data-error='true'] {
      border: 1px solid #dd1405 !important;
      color: #dd1405;

      &::placeholder {
        color: #dd1405;
      }

      &:focus {
        outline: none !important;
        color: #dd1405;
      }
    }
  }

  .mantine-TextInput-error {
    font-weight: 600;
    font-size: 12px;
    line-height: 16px;
    color: #dd1405;
  }

  // Mantine Select
  .mantine-Select-wrapper {
    position: relative;
  }

  .mantine-Select-label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    line-height: 20px;
    color: #283b3c;
    margin-bottom: 6px;

    .optional-label {
      font-weight: 400;
      font-size: 12px;
      line-height: 16px;
      color: #819596;
    }
  }

  .mantine-Select-section {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    color: #abbebe;
  }

  .mantine-Select-section[data-position='left'] {
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
  }

  .mantine-Select-section[data-position='right'] {
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
  }

  .mantine-Select-input {
    width: 100%;
    height: 36px;
    border: 1px solid #d6eaeb !important;
    border-radius: 4px;
    background: #fff;
    color: #283b3c;
    font-size: 14px;
    font-weight: 400;
    line-height: 20px;
    padding-inline: 12px;
    box-shadow: none;
    cursor: pointer;

    &:focus {
      outline: 1px solid #008b91;
    }

    &[data-error='true'] {
      border: 1px solid #dd1405 !important;
      color: #dd1405;

      &::placeholder {
        color: #dd1405;
      }

      &:focus {
        outline: none;
        color: #dd1405;
      }
    }
  }

  .mantine-Select-error {
    font-weight: 600;
    font-size: 12px;
    line-height: 16px;
    color: #dd1405;
  }

  .mantine-Select-input::placeholder {
    font-weight: 400;
    font-size: 0.875rem;
    color: #819596;
  }

  .mantine-Select-dropdown {
    --mantine-scale: 1;
    position: absolute;
    background: #ffffff;
    border: 1px solid #d9e7e8;
    padding: 0.25rem;
    border-radius: 0.25rem;
    margin: 0 !important;
  }

  .mantine-ScrollArea-root {
    --scrollarea-scrollbar-size: calc(0.75rem * var(--mantine-scale));
    position: relative;
    overflow: hidden;
  }

  .mantine-ScrollArea-viewport {
    padding-inline-end: 0.25rem;
    padding-inline-start: unset;
    scrollbar-width: none;
    overscroll-behavior: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    height: 100%;
  }

  .mantine-Select-option {
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-weight: 400;
    font-size: 0.875rem;
    color: #385b5c;
    word-break: break-word;
    border-radius: 0.25rem;
    background-color: transparent;
    padding: 0.375rem 0.625rem;

    &[aria-selected='true'] {
      font-weight: 600;
      color: #162324;

      svg {
        opacity: 0.4;
        width: 0.8em;
        min-width: 0.8em;
        height: 0.8em;
      }
    }

    &:hover {
      background-color: #ecf3f3;
    }
  }

  .mantine-ScrollArea-scrollbar {
    user-select: none;
    touch-action: none;
    box-sizing: border-box;
    transition:
      background-color 150ms ease,
      opacity 150ms ease;
    padding: calc(0.25rem / 5);
    display: flex;
    background-color: transparent;
    flex-direction: row;

    &:where([data-orientation='horizontal']) {
      height: 0.25rem;
      flex-direction: column;
      bottom: 0;
      inset-inline-start: 0;
      inset-inline-end: 0px;
    }

    &:where([data-orientation='vertical']) {
      width: 0.25rem;
      top: 0;
      bottom: 0px;
      inset-inline-end: 0;
    }

    &:where([data-hidden], [data-state='hidden']) {
      display: none;
    }
  }

  .mantine-ScrollArea-thumb {
    background-color: rgba(0, 0, 0, 0.4);
    flex: 1;
    border-radius: 0.25rem;
    position: relative;
    transition: background-color 150ms ease;
    overflow: hidden;
    opacity: var(--thumb-opacity);
  }

  // Mantine Checkbox
  .mantine-Checkbox-body {
    display: flex;
  }

  .mantine-Checkbox-inner {
    position: relative;
    width: 1.25rem;
    height: 1.25rem;
    order: 1;
  }

  .mantine-Checkbox-labelWrapper {
    -webkit-tap-highlight-color: transparent;
    display: inline-flex;
    flex-direction: column;
    cursor: pointer;
    order: 2;
  }

  .mantine-Checkbox-label {
    margin-bottom: 0 !important;
    font-weight: 600;
    font-size: 0.875rem;
    line-height: 1.25rem;
    color: #283b3c;
    padding-inline-start: 0.75rem;
  }

  .mantine-Checkbox-input {
    border: 1px solid #d6eaeb !important;
    background-color: #fff !important;
    appearance: none;
    border: 0.0625rem solid transparent;
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 0.25rem;
    padding: 0;
    display: block;
    margin: 0;
    transition:
      border-color 100ms ease,
      background-color 100ms ease;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;

    &:focus {
      outline: none;
    }
  }

  .mantine-Checkbox-error {
    font-weight: 600;
    font-size: 12px;
    line-height: 16px;
    color: #dd1405;
    padding-left: 12px;
  }

  .mantine-Checkbox-input:checked {
    background-color: #008b91 !important;
    border-color: #008b91 !important;
  }

  .mantine-Checkbox-input:checked + .mantine-Checkbox-icon {
    opacity: 1;
    transform: none;
  }

  .mantine-Checkbox-icon {
    margin: auto !important;
    position: absolute;
    inset: 0;
    width: 60%;
    margin: auto;
    color: #fff;
    pointer-events: none;
    transform: translateY(0.3125rem) scale(0.5);
    opacity: 0;
    transition:
      transform 100ms ease,
      opacity 100ms ease;
  }

  // Tab - Profile
  .eb-user-account__profile {
    position: relative;
    width: 100%;
    max-width: 1190px !important;
    margin: 0 auto !important;

    .eb-profile__title {
      font-size: 32px;
      line-height: 42px;
      font-weight: 700;
      color: #283b3c;
    }

    .eb-profile__content {
      display: flex;
      flex-direction: column;
      gap: 40px;
      padding-bottom: 32px;
      margin-top: 48px;
    }

    .eb-profile__section {
      display: flex;
      flex-direction: column;
      gap: 40px;

      .eb-profile__row {
        display: grid;
        gap: 32px;

        .eb-profile__row-field {
          display: flex;
          flex-direction: column;
          gap: 8px;

          .eb-profile__row-field-description {
            font-weight: 400;
            font-size: 14px;
            line-height: 20px;
            color: #abbebe;
          }
        }
      }
    }

    .eb-profile__password-section {
      display: flex;
      flex-direction: column;
      gap: 12px;

      &--visible {
        background: #fff7f4;
        border-radius: 8px;
        padding: 16px;
      }

      .eb-profile__password-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 16px;

        .eb-profile__password-close {
          cursor: pointer;
          background: transparent;
          border: 0;
          box-shadow: none;
          padding: 0;
          margin: 0;
          width: 18px;
          height: 18px;
          display: flex;
          align-items: center;
          justify-content: center;
          color: #283b3c;
          transition: color 0.3s ease;

          svg {
            width: 18px;
            height: 18px;
          }

          &:hover {
            color: #f75d25;
          }
        }
      }

      .eb-profile__password-title {
        font-weight: 600;
        font-size: 16px;
        line-height: 24px;
        color: #283b3c;
      }

      .eb-profile__password-fields {
        display: flex;
        flex-direction: column;
        gap: 24px;
        margin-top: 28px;
      }

      .eb-profile__password-row {
        display: grid;
        gap: 32px;
      }

      .eb-profile__password-actions {
        display: flex;
        flex-direction: row;
        gap: 16px;

        .eb-profile__btn {
          font-size: 12px;
          line-height: 16px;
          padding: 8px 12px;
        }
      }

      .eb-profile__password-toggle {
        .eb-profile__btn {
          font-size: 12px;
          line-height: 16px;
          padding: 8px 12px;
        }
      }
    }

    .eb-profile__additional-fields {
      display: flex;
      flex-direction: column;
      gap: 40px;

      .eb-profile__additional-fields-title {
        font-weight: 700;
        font-size: 16px;
        line-height: 24px;
        color: #283b3c;
      }

      .eb-profile__row {
        display: grid;
        gap: 32px;
      }
    }

    .eb-profile__footer {
      background: #fff;
      padding-top: 32px;
      border-top: 1px solid #e5e5e5;

      .eb-profile__footer-content {
        position: relative;
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        justify-content: space-between;
        gap: 1em;

        .eb-profile__footer-note {
          font-weight: 400;
          font-size: 14px;
          line-height: 20px;
          color: #819596;
        }
      }

      .eb-profile__message {
        width: 100%;
        max-width: 400px;
        position: absolute;
        top: -100px;
        left: 50%;
        transform: translate(-50%, 0);
        z-index: 10;
        border-radius: 8px;
        font-weight: 500;
        font-size: 14px;
        line-height: 20px;
        color: #283b3c;
        padding: 12px 16px;
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 8px;

        &--success {
          border: 1px solid #00b61d;
          background-color: #e6f8e9;
        }

        &--error {
          border: 1px solid #dd1405;
          background-color: #fdedeb;
        }

        &--animated {
          animation: slideUpFadeIn 0.3s ease-out forwards;
        }

        .eb-profile__message-text {
          flex: 1;
        }

        .eb-profile__message-close {
          background: none;
          border: none;
          cursor: pointer;
          padding: 0;
          width: 20px;
          height: 20px;
          display: flex;
          align-items: center;
          justify-content: center;
          color: #819596;
          transition: color 0.2s ease;
          flex-shrink: 0;
          box-shadow: none;

          &:hover {
            color: #283b3c;
          }

          svg {
            width: 16px;
            height: 16px;
          }
        }
      }

      @keyframes slideUpFadeIn {
        from {
          transform: translate(-50%, 20px);
          opacity: 0;
        }
        to {
          transform: translate(-50%, 0);
          opacity: 1;
        }
      }
    }

    .eb-profile__btn {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
      width: max-content;
      border-radius: 4px;
      font-weight: 600;
      font-size: 14px;
      line-height: 20px;
      padding: 8px 16px;
      border: 1px solid #f75d25;
      cursor: pointer;
      box-shadow: none;
      transition: background 0.3s ease;

      svg {
        width: 16px;
        height: 16px;
      }

      &:disabled {
        opacity: 0.5;
        cursor: not-allowed;
      }

      &--primary {
        background: #f75d25;
        color: #fff;

        &:hover {
          background: hsl(16, 93%, 56%, 0.8);
          color: #fff;
        }
      }

      &--secondary {
        background: #fff;
        color: #f75d25;

        &:hover {
          background: #f75d25;
          color: #fff;
        }
      }
    }
  }

  @media (min-width: 768px) {
    .eb-user-account__profile {
      .eb-profile__section {
        .eb-profile__row {
          grid-template-columns: repeat(2, 1fr);
        }
      }

      .eb-profile__password-section {
        .eb-profile__password-row {
          grid-template-columns: repeat(2, 1fr);
        }
      }

      .eb-profile__additional-fields {
        .eb-profile__row {
          grid-template-columns: repeat(2, 1fr);
        }
      }

      .eb-profile__footer {
        .eb-profile__footer-content {
          flex-direction: row;
          align-items: center;
        }
      }
    }
  }
}
