/* CONSUMER_ACCOUNT_LIBRARY_CSS_V1 */

.consumer-manager-card {
  margin: 16px 0;
  padding: 20px;
  border: 1px solid #dce7f5;
  border-radius: 20px;
  background:
    linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow:
    0 4px 12px rgba(25, 57, 105, .04),
    0 16px 34px rgba(25, 57, 105, .05);
}

.consumer-manager-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 15px;
}

.consumer-manager-heading h3 {
  margin: 2px 0 4px;
  color: #102044;
  font-size: 1.14rem;
  letter-spacing: -.02em;
}

.consumer-manager-heading p {
  margin: 0;
  color: #718096;
  font-size: .84rem;
  line-height: 1.4;
}

.consumer-eyebrow {
  display: block;
  color: #376bdc;
  font-size: .66rem;
  font-weight: 850;
  letter-spacing: .12em;
}

.consumer-count-pill {
  min-width: 32px;
  height: 32px;
  padding: 0 10px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #e9f2ff;
  color: #2461cf;
  font-weight: 800;
  font-size: .82rem;
}

.consumer-product-manager {
  display: grid;
  gap: 10px;
}

.consumer-product-row {
  padding: 12px;
  border: 1px solid #e0e8f3;
  border-radius: 16px;
  background: #fff;
}

.consumer-product-main {
  display: flex;
  align-items: center;
  gap: 12px;
}

.consumer-product-main img,
.consumer-product-placeholder {
  width: 62px;
  height: 62px;
  flex: 0 0 62px;
  border-radius: 13px;
  object-fit: cover;
  background: #edf4ff;
}

.consumer-product-placeholder {
  display: grid;
  place-items: center;
  color: #356ee1;
  font-size: 1.4rem;
}

.consumer-product-copy {
  min-width: 0;
  flex: 1;
}

.consumer-product-copy strong,
.consumer-product-copy span {
  display: block;
}

.consumer-product-copy strong {
  overflow: hidden;
  color: #142440;
  font-size: .94rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.consumer-product-copy span {
  margin-top: 3px;
  color: #748298;
  font-size: .79rem;
}

.consumer-row-actions {
  display: flex;
  justify-content: flex-end;
  gap: 16px;
  margin-top: 9px;
}

.consumer-link-button {
  padding: 6px 2px;
  border: 0;
  background: transparent;
  color: #2765d6;
  font-weight: 750;
  font-size: .81rem;
}

.consumer-link-button.danger {
  color: #b53c48;
}

.consumer-product-edit-form {
  margin-top: 12px;
  padding-top: 13px;
  border-top: 1px solid #e6ecf4;
}

.consumer-product-edit-form label {
  display: block;
  margin-bottom: 10px;
  color: #455770;
  text-align: left;
  font-size: .76rem;
  font-weight: 750;
}

.consumer-product-edit-form input,
.consumer-product-edit-form select {
  width: 100%;
  margin-top: 5px;
  padding: 11px 12px;
  border: 1px solid #cad6e5;
  border-radius: 11px;
  background: #fff;
  color: #142440;
}

.consumer-edit-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}


/* Fixed consumer navigation */

.consumer-mobile-nav {
  position: fixed;
  z-index: 850;
  left: 50%;
  bottom: max(12px, env(safe-area-inset-bottom));
  transform: translateX(-50%);

  width: min(420px, calc(100% - 24px));
  min-height: 62px;
  padding: 7px;

  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;

  border: 1px solid rgba(191, 207, 230, .9);
  border-radius: 21px;

  background: rgba(255, 255, 255, .94);

  box-shadow:
    0 12px 34px rgba(17, 41, 79, .15),
    0 2px 8px rgba(17, 41, 79, .06);

  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.consumer-nav-visible {
  padding-bottom: 90px;
}

.consumer-nav-item {
  position: relative;
  min-height: 48px;
  border: 0;
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: transparent;
  color: #687891;
  font-weight: 800;
}

.consumer-nav-item.active,
.consumer-nav-item:active {
  background: #edf4ff;
  color: #255fcf;
}

.consumer-nav-icon {
  font-size: 1.05rem;
}

.consumer-nav-badge {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #2563eb;
  color: #fff;
  font-size: .68rem;
}


/* My Try-Ons dialog */

.consumer-library-dialog {
  width: min(760px, calc(100% - 24px));
  max-height: min(88vh, 900px);
  padding: 0;
  border: 0;
  border-radius: 25px;
  background: #f5f8fd;
  color: #13213b;
  box-shadow: 0 24px 80px rgba(10, 30, 65, .26);
}

.consumer-library-dialog::backdrop,
.consumer-image-dialog::backdrop,
.consumer-confirm-dialog::backdrop {
  background: rgba(7, 18, 37, .55);
  backdrop-filter: blur(4px);
}

.consumer-dialog-shell {
  max-height: 88vh;
  overflow: auto;
  padding: 22px;
}

.consumer-dialog-header {
  position: sticky;
  z-index: 2;
  top: -22px;
  margin: -22px -22px 18px;
  padding: 22px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  background:
    linear-gradient(
      180deg,
      rgba(255,255,255,.99),
      rgba(255,255,255,.94)
    );
  border-bottom: 1px solid #e4eaf3;
  backdrop-filter: blur(14px);
}

.consumer-dialog-header h2 {
  margin: 3px 0 3px;
  font-size: 1.65rem;
  letter-spacing: -.04em;
}

.consumer-dialog-header p {
  max-width: 480px;
  margin: 0;
  color: #728096;
  font-size: .84rem;
}

.consumer-icon-button {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  padding: 0;
  border: 1px solid #d9e2ee;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #fff;
  color: #40516a;
  font-size: 1.5rem;
  line-height: 1;
}

.consumer-library-status {
  min-height: 18px;
  margin-bottom: 10px;
  color: #6e7c91;
  text-align: center;
  font-size: .82rem;
}

.consumer-history-group {
  margin-bottom: 23px;
}

.consumer-history-group > h3 {
  margin: 0 0 9px;
  color: #66758c;
  font-size: .79rem;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.consumer-history-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
}

.consumer-history-card {
  overflow: hidden;
  border: 1px solid #dde6f1;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 7px 22px rgba(24, 54, 99, .06);
}

.consumer-history-image {
  width: 100%;
  padding: 0;
  border: 0;
  display: block;
  background: #eaf0f8;
}

.consumer-history-image img {
  width: 100%;
  aspect-ratio: .84;
  display: block;
  object-fit: cover;
}

.consumer-history-copy {
  padding: 12px;
}

.consumer-history-copy strong,
.consumer-history-copy span {
  display: block;
}

.consumer-history-copy strong {
  overflow: hidden;
  font-size: .88rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.consumer-history-copy span {
  margin-top: 2px;
  color: #8190a5;
  font-size: .72rem;
}

.consumer-history-actions {
  margin-top: 10px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.consumer-history-actions button {
  min-height: 37px;
  padding: 8px;
  border: 1px solid #dbe4f0;
  border-radius: 10px;
  background: #f8fbff;
  color: #285fc4;
  font-weight: 750;
  font-size: .73rem;
}

.consumer-history-actions button.danger {
  color: #ae3b47;
  background: #fff9fa;
  border-color: #f0dadd;
}


/* Empty state */

.consumer-empty-state {
  padding: 52px 22px;
  text-align: center;
}

.consumer-empty-icon {
  width: 66px;
  height: 66px;
  margin: 0 auto 14px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #e9f2ff;
  color: #2866db;
  font-size: 1.7rem;
}

.consumer-empty-state h3 {
  margin: 0 0 5px;
}

.consumer-empty-state p {
  max-width: 300px;
  margin: auto;
  color: #748298;
  font-size: .86rem;
}


/* Image viewer */

.consumer-image-dialog {
  width: min(600px, calc(100% - 20px));
  padding: 0;
  border: 0;
  border-radius: 23px;
  background: #fff;
  box-shadow: 0 24px 80px rgba(5, 19, 46, .28);
}

.consumer-image-shell header {
  padding: 13px 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.consumer-image-shell img {
  width: 100%;
  max-height: 78vh;
  display: block;
  object-fit: contain;
  background: #edf2f8;
}


/* Confirmation dialog */

.consumer-confirm-dialog {
  width: min(390px, calc(100% - 30px));
  padding: 0;
  border: 0;
  border-radius: 21px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(9, 25, 52, .25);
}

.consumer-confirm-shell {
  padding: 23px;
}

.consumer-confirm-shell h3 {
  margin: 0 0 7px;
  color: #14233d;
  font-size: 1.25rem;
}

.consumer-confirm-shell p {
  margin: 0 0 19px;
  color: #697991;
  line-height: 1.45;
}

.consumer-confirm-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.consumer-danger-button {
  border: 0;
  border-radius: 12px;
  background: #c44753;
  color: #fff;
  font-weight: 800;
}


/* Mobile */

@media (max-width: 600px) {

  .consumer-library-dialog {
    width: 100%;
    max-width: none;
    height: calc(100dvh - 14px);
    max-height: none;
    margin: 14px 0 0;
    border-radius: 25px 25px 0 0;
  }

  .consumer-dialog-shell {
    height: 100%;
    max-height: none;
    padding: 18px;
  }

  .consumer-dialog-header {
    top: -18px;
    margin: -18px -18px 16px;
    padding: 19px 18px 16px;
  }

  .consumer-history-grid {
    grid-template-columns: 1fr;
  }

  .consumer-history-card {
    display: grid;
    grid-template-columns: 118px minmax(0, 1fr);
  }

  .consumer-history-image img {
    height: 100%;
    min-height: 158px;
    aspect-ratio: auto;
  }

  .consumer-history-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .consumer-history-actions {
    grid-template-columns: 1fr 1fr;
  }

  .consumer-manager-card {
    padding: 17px;
  }

}

.hidden {
  display: none !important;
}

/* Saved Try-Ons are available on desktop and merchant storefronts too. */
body.consumer-nav-visible {padding-bottom:90px}
.consumer-mobile-nav {display:grid!important}
.consumer-mobile-nav[hidden] {display:none!important}
.merchant-demo .consumer-library-dialog,.merchant-demo .consumer-image-dialog,.merchant-demo .consumer-confirm-dialog {color:#182235;background:white}
.merchant-demo .consumer-library-dialog button,.merchant-demo .consumer-image-dialog button,.merchant-demo .consumer-confirm-dialog button {color:#163b80;background:white}
.merchant-demo .consumer-mobile-nav {background:white;color:#182235}
.consumer-history-copy span {color:#526078}
