@layer base,component,page;

@layer base {
  :root {
    --primary-color: #008288;
    --light-text-color: #545f7a;
    --dark-color: #0f1b2d;
    --light-surface-color: #f2f2f2;
    --light-border-color: #dae1f2;
  }

  * {
    box-sizing: border-box;
  }

  body {
    font-family: system-ui;
    margin: 0;
  }

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

  .ax-button {
    all: unset;
    outline: revert;
    box-sizing: border-box;
  }
}

@layer component {
  .container {
    margin-inline: auto;
    max-width: 800px;
    padding-inline: 20px;
  }
}

@layer component {
  .sr-only,
  .sr-only-focusable:not(:focus):not(:focus-within) {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
}

@layer component {
  .title--lg {
    font-size: 1.87rem;
  }

  .title {
    font-size: 1.12rem;
    font-weight: 600;
    letter-spacing: 0.018rem;
  }

  .text--dimmed {
    color: var(--light-text-color);
    font-size: 0.87rem;
  }
}

@layer component {
  #layout-page-overlay {
    background-color: #fff;
    margin-top: -16px;
    border-top-right-radius: 16px;
    border-top-left-radius: 16px;
    padding-top: 10px;
    position: relative;
  }

  .layout-subpage {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 15px;
  }

  .layout-timestamp {
    margin-top: 12px;
    margin-bottom: 0;
  }

  .layout-timestamp:first-of-type {
    margin-top: 0;
  }
}

@layer component {
  #header {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 56px;
  }

  #header .back {
    background-image: url("/assets/back.svg");
    background-repeat: no-repeat;
    height: 24px;
    width: 30px;
    position: absolute;
    left: 0;
  }

  #header .page-title {
    margin: 0;
    font-size: 1.12rem;
    font-weight: 500;
  }

  #main-with-small-header {
    padding-top: 20px;
  }
}

@layer component {
  #app-header {
    position: relative;
    background-color: var(--primary-color);
    color: #fff;
    padding-top: 28px;
    padding-bottom: 40px;
  }

  #app-header h1 {
    margin-top: 0;
    font-size: 1.12rem;
    font-weight: 400;
    text-align: center;
  }
}

@layer component {
  .input {
    border: 1px solid var(--light-border-color);
    width: 100%;
    display: block;
    padding: 13px;
    border-radius: 3px;
    margin: 0;
  }

  .input-fixed-icon {
    display: flex;
  }

  .input-fixed-left {
    padding: 20px;
    border: 1px solid var(--light-border-color);
    border-right: 0;
    border-top-left-radius: 3px;
    border-bottom-left-radius: 3px;
  }

  .input-fixed-left + .input {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
  }

  .input-search {
    background-image: url("/assets/magnifier.svg");
    background-position: 5px center;
    background-repeat: no-repeat;
    padding-left: 35px;
    border-radius: 10px;
  }

  .form-line {
    margin-bottom: 24px;
  }

  label {
    margin-bottom: 14px;
    display: inline-block;
    color: var(--light-text-color);
    font-size: 0.87rem;
  }

  .form-buttons {
    display: grid;
    gap: 15px;
  }
}

@layer component {
  .avatar {
    border-radius: 50%;
  }
}

@layer component {
  .btn {
    text-decoration: none;
    border-radius: 4px;
    padding: 15px 20px;
    text-align: center;
    letter-spacing: 0.4px;
    display: inline-block;
    cursor: pointer;
    transition: opacity 0.2s, translate 0.2s;
  }

  .btn--raised {
    background-color: var(--primary-color);
    color: #fff;
  }

  .btn--link {
    color: var(--primary-color);
  }

  .btn--block {
    width: 100%;
    max-width: 800px;
    display: block;
    margin-inline: auto;
  }

  .btn:hover {
    opacity: 0.8;
  }

  .btn:active {
    translate: 1px, 1px;
  }
}

@layer component {
  .entry {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 15px 0;
  }

  .entry-details {
    flex: 1 1 auto;
  }

  .entry-name {
    margin-top: 0;
    margin-bottom: 6px;
  }

  .entry-description {
    color: var(--light-text-color);
    margin-top: 0;
    margin-bottom: 0;
    font-size: 0.87rem;
  }

  .entry-price {
    color: var(--dark-color);
    font-weight: 700;
  }
}

@layer component {
  #nav-spacer {
    height: 70px;
  }

  nav {
    position: fixed;
    bottom: 0;
    width: 100%;
    background-color: #fff;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    box-shadow: 0 -1px 1px #0000001a;
    text-align: center;
  }

  .nav-item {
    padding: 15px 0;
  }
}

@layer component {
  #dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 20px 0;
  }

  .dot {
    border-radius: 50%;
    width: 12px;
    height: 12px;
    border: 1px solid var(--primary-color);
    transition: background-color 0.2s, scale 0.1s;
    scale: 0.75;
  }

  .dot.active {
    background-color: var(--primary-color);
    scale: 1;
  }
}

@layer component {
  #slider {
    display: grid;
    grid-template-columns: 100% 100% 100%;
    overflow-x: scroll;
    scroll-snap-type: x mandatory;
  }

  #slider .slide {
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }

  .slide-title {
    margin-top: 40px;
  }
}

@layer component {
  #cards {
    display: flex;
    gap: 16px;
    scroll-snap-type: x mandatory;
    overflow-x: scroll;
    padding-top: 16px;
  }

  #cards .card {
    scroll-snap-align: center;
    scroll-snap-stop: always;
    flex: 0 0 75%;
    padding: 16px;
    border-radius: 8px;
    box-shadow: 1px 1px 2px #00000040;
  }

  .card--dark {
    background-color: var(--dark-color);
    color: #fff;
  }

  .card--light {
    background-color: #fff;
    color: var(--dark-color);
  }

  .card-container {
    background-image: url("/assets/mastercard.png");
    background-repeat: no-repeat;
    background-size: 27px 17px;
    padding-top: 26px;
  }

  .card-amount {
    font-size: 1.37rem;
    font-weight: 700;
  }

  .card-dots {
    letter-spacing: 1px;
    padding-right: 5px;
  }

  .card-details {
    display: flex;
    justify-content: space-between;
  }

  .card-type {
    font-size: 0.87rem;
    opacity: 0.8;
  }

  .card-last4 {
    font-size: 0.87rem;
  }
}

@layer component {
  .actions-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    place-items: center;
    padding-top: 24px;
  }

  .action {
    display: flex;
    place-items: center;
    padding: 23px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 1px 1px #0000000d;
    border-radius: 10px;
    background-repeat: no-repeat;
    background-position: center;
    transition: background-color 0.2s, translate 0.2s;
  }

  .action:hover {
    background-color: #00000014;
  }

  .action:active {
    translate: 1px, 1px;
  }

  .action-topup {
    background-image: url("/assets/arrow-up.svg");
  }

  .action-send {
    background-image: url("/assets/arrow-right.svg");
  }

  .action-add {
    background-image: url("/assets/add.svg");
  }

  .action-exchange {
    background-image: url("/assets/exchange.svg");
  }

  .action-label {
    font-size: 0.75rem;
    color: var(--light-text-color);
    margin-top: 10px;
    text-align: center;
  }
}

@layer component {
  .items {
    list-style: none;
    padding-left: 0;
  }

  .items .item {
    display: flex;
    align-items: center;
    gap: 16px;
    background-image: url("/assets/chevron-right.svg");
    background-position: right 10px center;
    background-repeat: no-repeat;
    padding: 15px 30px 15px 10px;
    text-decoration: none;
    border-bottom: 1px solid var(--light-border-color);
  }

  .items li:last-child .item {
    border-bottom: 0;
  }

  .items .item-name {
    flex: 1;
    color: var(--dark-color);
    font-size: 0.94rem;
    margin: 0;
  }

  .item-name-contact {
    margin-top: 0;
    margin-bottom: 6px;
  }

  .item-name-phone {
    margin-top: 0;
    margin-bottom: 0;
    color: var(--light-text-color);
    font-size: 0.87rem;
  }
}

@layer component {
  #pills {
    display: flex;
    align-items: center;
    justify-content: space-between;
    list-style: none;
    padding-left: 0;
    font-size: 0.94rem;
  }

  #pills .pill {
    background-color: var(--light-surface-color);
    padding: 10px 20px;
    border-radius: 20px;
    color: var(--dark-color);
  }

  #pills .pill.active {
    color: #fff;
    background-color: var(--primary-color);
  }
}

@layer page {
  #onboarding-layout {
    height: 100vh;
    height: 100dvh;
    display: grid;
    padding: 60px 30px 30px;
    text-align: center;
  }

  #onboarding-buttons {
    align-self: end;
  }
}

@layer page {
  .recover-password {
    background-image: url("/assets/lock.svg");
    background-repeat: no-repeat;
    background-position: left center;
    padding-left: 30px;
    text-align: left;
  }

  .flag-us {
    background-image: url("/assets/flag-us.svg");
    background-repeat: no-repeat;
    background-position: center;
  }
}

@layer page {
  #header-profile-wrapper {
    text-align: center;
  }

  #header-profile-wrapper h1 {
    margin-top: 10px;
  }

  #header-profile-top-right {
    position: absolute;
    top: 16px;
    right: 16px;
  }
}
