// Ionic Variables and Theming. For more info, please see:
// http://ionicframework.com/docs/theming/

/** Ionic CSS Variables **/
:root {
  /** primary **/
  --ion-color-primary: #00e8cc;
  --ion-color-primary-rgb: 0, 232, 204;
  --ion-color-primary-contrast: #311b58;
  --ion-color-primary-contrast-rgb: 49, 27, 88;
  --ion-color-primary-shade: #00ccb4;
  --ion-color-primary-tint: #1aead1;

  /** secondary **/
  --ion-color-secondary: #311b58;
  --ion-color-secondary-rgb: 49, 27, 88;
  --ion-color-secondary-contrast: #00e8cc;
  --ion-color-secondary-contrast-rgb: 0, 232, 204;
  --ion-color-secondary-shade: #2b184d;
  --ion-color-secondary-tint: #463269;

  /** tertiary **/
  --ion-color-tertiary: #7044ff;
  --ion-color-tertiary-rgb: 112, 68, 255;
  --ion-color-tertiary-contrast: #ffffff;
  --ion-color-tertiary-contrast-rgb: 255, 255, 255;
  --ion-color-tertiary-shade: #633ce0;
  --ion-color-tertiary-tint: #7e57ff;

  /** success **/
  --ion-color-success: #10dc60;
  --ion-color-success-rgb: 16, 220, 96;
  --ion-color-success-contrast: #ffffff;
  --ion-color-success-contrast-rgb: 255, 255, 255;
  --ion-color-success-shade: #0ec254;
  --ion-color-success-tint: #28e070;

  /** warning **/
  --ion-color-warning: #ffce00;
  --ion-color-warning-rgb: 255, 206, 0;
  --ion-color-warning-contrast: #ffffff;
  --ion-color-warning-contrast-rgb: 255, 255, 255;
  --ion-color-warning-shade: #e0b500;
  --ion-color-warning-tint: #ffd31a;

  /** danger **/
  --ion-color-danger: #f04141;
  --ion-color-danger-rgb: 245, 61, 61;
  --ion-color-danger-contrast: #ffffff;
  --ion-color-danger-contrast-rgb: 255, 255, 255;
  --ion-color-danger-shade: #d33939;
  --ion-color-danger-tint: #f25454;

  /** dark **/
  --ion-color-dark: #222428;
  --ion-color-dark-rgb: 34, 34, 34;
  --ion-color-dark-contrast: #ffffff;
  --ion-color-dark-contrast-rgb: 255, 255, 255;
  --ion-color-dark-shade: #1e2023;
  --ion-color-dark-tint: #383a3e;

  /** medium **/
  --ion-color-medium: #989aa2;
  --ion-color-medium-rgb: 152, 154, 162;
  --ion-color-medium-contrast: #ffffff;
  --ion-color-medium-contrast-rgb: 255, 255, 255;
  --ion-color-medium-shade: #86888f;
  --ion-color-medium-tint: #a2a4ab;

  /** light **/
  --ion-color-light: #f4f4f4;
  --ion-color-light-rgb: 244, 244, 244;
  --ion-color-light-contrast: #000000;
  --ion-color-light-contrast-rgb: 0, 0, 0;
  --ion-color-light-shade: #d7d8da;
  --ion-color-light-tint: #f5f6f9;

  /** secondary light **/
  --ion-color-secondaryLight: #440094;
  --ion-color-secondaryLight-rgb: 68, 0, 148;
  --ion-color-secondaryLight-contrast: #ffffff;
  --ion-color-secondaryLight-contrast-rgb: 255, 255, 255;
  --ion-color-secondaryLight-shade: #3c0082;
  --ion-color-secondaryLight-tint: #571a9f;

  /** gray **/
  --ion-color-gray: #d3d3d3;
  --ion-color-gray-rgb: 211, 211, 211;
  --ion-color-gray-contrast: #000;
  --ion-color-gray-contrast-rgb: 255, 255, 255;
  --ion-color-gray-shade: #bababa;
  --ion-color-gray-tint: #d7d7d7;

  /** gray light **/
  --ion-color-grayLight: #f4f4f4;
  --ion-color-grayLight-rgb: 244, 244, 244;
  --ion-color-grayLight-contrast: #000;
  --ion-color-grayLight-contrast-rgb: 255, 255, 255;
  --ion-color-grayLight-shade: #d7d7d7;
  --ion-color-grayLight-tint: #f5f5f5;

  /* sets the color of ion-title to secondary */
  ion-title {
    --color: var(--ion-color-secondary);
  }

  /* sets the colof of ion-back-button to secondary and removes margin */
  ion-back-button {
    --icon-margin-end: 0;
    --color: var(--ion-color-secondary);
  }

  /* Set the border width and padding on all ion-button elements */
  ion-button {
    --border-width: 1px;
    --padding-start: 1.5rem;
    --padding-end: 1.5rem;
  }

  /* Set the padding with on ion-button in ion-toolbar elements */
  ion-toolbar ion-button {
    --padding-start: 0.5rem;
    --padding-end: 0.5rem;
  }

  ion-alert {
    --max-width: calc(100% - 32px);
  }

  ion-split-pane {
    --side-max-width: 10vw;
  }
  --ion-toolbar-background: #fff;

  page-portfolio,
  page-delegation-baker-detail,
  page-delegation-polkadot-validator-detail,
  page-account-address,
  page-transaction-qr,
  page-beacon-request,
  page-transaction-qr,
  page-collectibles-list,
  page-collectibles-item {
    .sc-ion-card-md-h,
    .sc-ion-card-ios-h,
    ion-card,
    airgap-qr {
      box-shadow: 0 10px 20px 0 rgba(49, 27, 88, 0.12);
      border: 1px solid rgba(0, 232, 204, 0.08);
    }
  }
}

.ion-color-white {
  --ion-color-base: #fff;
  --ion-color-base-rgb: 255, 255, 255;
  --ion-color-contrast: #000;
  --ion-color-contrast-rgb: 0, 0, 0;
  --ion-color-shade: #e0e0e0;
  --ion-color-tint: #ffffff;
}

.ion-color-black {
  --ion-color-base: #000;
  --ion-color-base-rgb: 0, 0, 0;
  --ion-color-contrast: #000;
  --ion-color-contrast-rgb: 255, 255, 255;
  --ion-color-shade: #5ca56c;
  --ion-color-tint: #78c288;
}

.ion-color-whiteLight {
  --ion-color-base: #311b58;
  --ion-color-base-rgb: 49, 27, 88;
  --ion-color-contrast: #ffffff;
  --ion-color-contrast-rgb: 255, 255, 255;
  --ion-color-shade: #2b184d;
  --ion-color-tint: #463269;
}

.ion-color-blackLight {
  --ion-color-base: rgba(0, 0, 0, 0.54);
  --ion-color-base-rgb: 49, 27, 88;
  --ion-color-contrast: #ffffff;
  --ion-color-contrast-rgb: 255, 255, 255;
  --ion-color-shade: #5ca56c;
  --ion-color-tint: #78c288;
}

.ion-color-grayLight {
  --ion-color-base: #f4f4f4;
  --ion-color-base-rgb: 0, 0, 0;
  --ion-color-contrast: #000;
  --ion-color-contrast-rgb: 255, 255, 255;
  --ion-color-shade: #5ca56c;
  --ion-color-tint: #78c288;
}

.action--container {
  background-color: var(--ion-toolbar-background);
}

/*
 * Dark Colors
 * Refer to https://ionicframework.com/docs/theming/dark-mode#ionic-dark-theme
 * -------------------------------------------
 */

body.dark {
  --ion-color-primary: #00e8cc;
  --ion-color-primary-rgb: 0, 232, 204;
  --ion-color-primary-contrast: #311b58;
  --ion-color-primary-contrast-rgb: 49, 27, 88;
  --ion-color-primary-shade: #00ccb4;
  --ion-color-primary-tint: #1aead1;

  --ion-color-secondary: #7044ff;
  --ion-color-secondary-rgb: 112, 68, 255;
  --ion-color-secondary-contrast: #00e8cc;
  --ion-color-secondary-contrast-rgb: 0, 232, 204;
  --ion-color-secondary-shade: #633ce0;
  --ion-color-secondary-tint: #7e57ff;

  --ion-color-tertiary: #6a64ff;
  --ion-color-tertiary-rgb: 106, 100, 255;
  --ion-color-tertiary-contrast: #ffffff;
  --ion-color-tertiary-contrast-rgb: 255, 255, 255;
  --ion-color-tertiary-shade: #5d58e0;
  --ion-color-tertiary-tint: #7974ff;

  --ion-color-success: #2fdf75;
  --ion-color-success-rgb: 47, 223, 117;
  --ion-color-success-contrast: #000000;
  --ion-color-success-contrast-rgb: 0, 0, 0;
  --ion-color-success-shade: #29c467;
  --ion-color-success-tint: #44e283;

  --ion-color-warning: #ffd534;
  --ion-color-warning-rgb: 255, 213, 52;
  --ion-color-warning-contrast: #000000;
  --ion-color-warning-contrast-rgb: 0, 0, 0;
  --ion-color-warning-shade: #e0bb2e;
  --ion-color-warning-tint: #ffd948;

  --ion-color-danger: #ff4961;
  --ion-color-danger-rgb: 255, 73, 97;
  --ion-color-danger-contrast: #ffffff;
  --ion-color-danger-contrast-rgb: 255, 255, 255;
  --ion-color-danger-shade: #e04055;
  --ion-color-danger-tint: #ff5b71;

  --ion-color-dark: #f4f5f8;
  --ion-color-dark-rgb: 244, 245, 248;
  --ion-color-dark-contrast: #000000;
  --ion-color-dark-contrast-rgb: 0, 0, 0;
  --ion-color-dark-shade: #d7d8da;
  --ion-color-dark-tint: #f5f6f9;

  --ion-color-medium: #989aa2;
  --ion-color-medium-rgb: 152, 154, 162;
  --ion-color-medium-contrast: #000000;
  --ion-color-medium-contrast-rgb: 0, 0, 0;
  --ion-color-medium-shade: #86888f;
  --ion-color-medium-tint: #a2a4ab;

  --ion-color-light: #222428;
  --ion-color-light-rgb: 34, 36, 40;
  --ion-color-light-contrast: #ffffff;
  --ion-color-light-contrast-rgb: 255, 255, 255;
  --ion-color-light-shade: #1e2023;
  --ion-color-light-tint: #383a3e;

  .ion-color-blackLight {
    --ion-color-base: #989aa2;
    --ion-color-base-rgb: 152, 154, 162;
    --ion-color-base-contrast: #000000;
    --ion-color-base-contrast-rgb: 0, 0, 0;
    --ion-color-base-shade: #d7d8da;
    --ion-color-base-tint: #f5f6f9;
  }

  .ion-color-black {
    --ion-color-base: #fff;
    --ion-color-base-rgb: 255, 255, 255;
    --ion-color-contrast: #000;
    --ion-color-contrast-rgb: 0, 0, 0;
    --ion-color-shade: #e0e0e0;
    --ion-color-tint: #ffffff;
  }

  --ion-toolbar-background: #1e1e1e;
  --ion-item-background: #1e1e1e;

  --ion-background-color: #1e1e1e;
  --ion-background-color-rgb: 30, 30, 30;

  --ion-text-color: #fafafa;
  --ion-text-color-rgb: 255, 255, 255;

  ion-tab-button {
    --color-selected: var(--ion-color-primary);
  }

  ion-toolbar {
    .button {
      --color: var(--ion-color-primary) !important;
    }
  }
  ion-title {
    --color: var(--ion-color-primary);
  }

  ion-card {
    --ion-card-background: var(--ion-color-step-100);
    ion-item {
      --ion-item-background: var(--ion-color-step-100);
    }
  }

  airgap-iac-qr {
    ion-select {
      color: #000;
    }
  }

  page-portfolio,
  page-delegation-baker-detail,
  page-delegation-polkadot-validator-detail,
  page-account-address,
  page-transaction-qr,
  page-beacon-request,
  page-exchange-custom,
  page-transaction-qr,
  page-collectibles-list,
  page-collectibles-item {
    .sc-ion-card-md-h,
    .sc-ion-card-ios-h,
    ion-card,
    airgap-qr {
      box-shadow: 0 10px 20px 0 rgba(var(--ion-color-primary-rgb), 0.04);
      border: 1px solid rgba(var(--ion-color-primary-rgb), 0.04);
    }
  }
}

/*
 * iOS Dark Theme
 * -------------------------------------------
 */

.ios body.dark {
  --ion-border-color: #222222;

  --ion-color-step-50: #1e1e1e;
  --ion-color-step-100: #222222;
  --ion-color-step-150: #363636;
  --ion-color-step-200: #414141;
  --ion-color-step-250: #4d4d4d;
  --ion-color-step-300: #595959;
  --ion-color-step-350: #656565;
  --ion-color-step-400: #717171;
  --ion-color-step-450: #7d7d7d;
  --ion-color-step-500: #898989;
  --ion-color-step-550: #949494;
  --ion-color-step-600: #a0a0a0;
  --ion-color-step-650: #acacac;
  --ion-color-step-700: #b8b8b8;
  --ion-color-step-750: #c4c4c4;
  --ion-color-step-800: #d0d0d0;
  --ion-color-step-850: #dbdbdb;
  --ion-color-step-900: #e7e7e7;
  --ion-color-step-950: #f3f3f3;

  --ion-tab-bar-background: #1f1f1f;

  --ion-card-background: #1e1e1e;
}

/*
 * Material Design Dark Theme
 * -------------------------------------------
 */

.md body.dark {
  --ion-border-color: #222222;

  --ion-color-step-50: #1e1e1e;
  --ion-color-step-100: #222222;
  --ion-color-step-150: #363636;
  --ion-color-step-200: #414141;
  --ion-color-step-250: #4d4d4d;
  --ion-color-step-300: #595959;
  --ion-color-step-350: #656565;
  --ion-color-step-400: #717171;
  --ion-color-step-450: #7d7d7d;
  --ion-color-step-500: #898989;
  --ion-color-step-550: #949494;
  --ion-color-step-600: #a0a0a0;
  --ion-color-step-650: #acacac;
  --ion-color-step-700: #b8b8b8;
  --ion-color-step-750: #c4c4c4;
  --ion-color-step-800: #d0d0d0;
  --ion-color-step-850: #dbdbdb;
  --ion-color-step-900: #e7e7e7;
  --ion-color-step-950: #f3f3f3;

  --ion-tab-bar-background: #1f1f1f;

  --ion-card-background: #1e1e1e;
}

body.dark {
  .rawdata--container {
    color: var(--ion-color-black);
  }
}

ion-avatar {
  min-width: 48px;
  min-height: 48px;
}

page-account-address {
  identicon,
  identicon img,
  ion-avatar {
    width: 64px;
    height: 64px;
  }
}

portfolio-item {
  .item-inner {
    align-items: flex-start;
  }
  div[slot='end'] {
    margin-inline-start: 8px;
  }
  ion-avatar {
    min-width: 40px;
    min-height: 40px;
    img {
      width: 100%;
    }
  }
}
page-portfolio {
  portfolio-item {
    div[slot='end'] {
      margin-inline-end: 0;
    }
  }
}

.item__image[slot='start'] {
  margin: 8px 16px 8px 0;
}
