@use 'global/common' as global;

/* ------------------------------
 トースト
------------------------------- */
.acms-license-toast {
  position: fixed;
  top: 100%;
  right: 10px;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 300px;
  box-shadow: 0 3px 6px rgb(0 0 0 / 15%);
  transform: translateY(-100%);
  transition: transform 0.4s ease;
}

.acms-license-toast-header {
  box-sizing: border-box;
  display: flex;
  width: 100%;
  padding: 10px;
  color: global.$acms-license-toast-text-color;
  background: global.$acms-license-toast-default;
  border-radius: 3px 3px 0 0;

  @include global.font-size(14);
}

.acms-license-toast-icon-btn {
  padding: 0;
  color: global.$acms-license-toast-black;
  appearance: none;
  background: transparent;
  border: 0;
}

.acms-license-toast-heading {
  display: flex;
  flex: 1;
  width: 100%;
  margin: 0 0 0 10px;
  line-height: 1.3;
  color: global.$acms-license-toast-text-color;

  @include global.font-size(14);
}

.acms-license-toast-body {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 10px;
  color: global.$acms-color-black;
  background: global.$acms-color-white;
  transition: opacity 0.2s;

  @include global.font-size(13);
}

.acms-license-toast-lead {
  margin: 0 0 15px;
  font-weight: bold;
  line-height: 1.5;

  @include global.font-size(16);
}

.acms-license-toast-desc {
  margin: 0;
  line-height: 1.7;

  @include global.font-size(13);
}

.acms-license-toast-desc + .acms-license-toast-desc {
  margin-top: 0;
}

.acms-license-toast-footer {
  box-sizing: border-box;
  display: flex;
  width: 100%;
  padding: 15px;
  background: global.$acms-color-white;
}

.acms-license-toast-body + .acms-license-toast-footer {
  padding-top: 0;
}

.acms-license-toast-closed {
  transform: translateY(-36px);
}

.acms-license-toast-success {
  .acms-license-toast-header {
    color: global.$acms-license-toast-text-success-color;
    background: global.$acms-license-toast-success-color;
  }

  .acms-license-toast-heading,
  .acms-license-toast-icon-btn {
    color: global.$acms-license-toast-text-success-color;
  }
}

.acms-license-toast-info {
  .acms-license-toast-header {
    color: global.$acms-license-toast-text-info-color;
    background: global.$acms-license-toast-info-color;
  }

  .acms-license-toast-heading,
  .acms-license-toast-icon-btn {
    color: global.$acms-license-toast-text-info-color;
  }
}

.acms-license-toast-warning {
  .acms-license-toast-header {
    color: global.$acms-license-toast-text-warning-color;
    background: global.$acms-license-toast-warning-color;
  }

  .acms-license-toast-heading,
  .acms-license-toast-icon-btn {
    color: global.$acms-license-toast-text-warning-color;
  }
}

.acms-license-toast-danger {
  .acms-license-toast-header {
    color: global.$acms-license-toast-text-danger-color;
    background: global.$acms-license-toast-danger-color;
  }

  .acms-license-toast-heading,
  .acms-license-toast-icon-btn {
    color: global.$acms-license-toast-text-danger-color;
  }
}

.js-admin-license-toast-toggle {
  z-index: global.zIndex(js-admin-license-toast-toggle);
}

@include global.media-breakpoint-down(md) {
  .acms-license-toast.acms-license-toast-static-md {
    position: static;
    top: auto;
    left: auto;
    max-width: inherit;
    margin: 0 0 15px;
    transform: translateY(0);
  }
}
