[data-license-ui-root]:empty {
  display: none;
}

.desktop-license-ui-root {
  position: relative;
  width: 100%;
  min-width: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, "Noto Sans TC", sans-serif;
}

.desktop-license-status-bar {
  width: 100%;
  height: 42px;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 4px max(14px, calc((100% - 1240px) / 2));
  border-bottom: 1px solid #cddfdb;
  color: #173f3a;
  background: #f4f8f7;
}

.desktop-license-status-button {
  width: min(100%, 430px);
  height: 34px;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(88px, auto) minmax(150px, 1fr) auto;
  align-items: center;
  gap: 9px;
  border: 1px solid #a9c6c0;
  border-radius: 6px;
  padding: 4px 9px;
  color: #164d47;
  background: #fff;
  box-shadow: 0 2px 6px rgba(18, 74, 67, .08);
  cursor: pointer;
  text-align: left;
}

.desktop-license-status-button:hover,
.desktop-license-status-button:focus-visible {
  border-color: #237b70;
  outline: 2px solid rgba(35, 123, 112, .18);
  outline-offset: 1px;
}

.desktop-license-state,
.desktop-license-summary,
.desktop-license-countdown {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  letter-spacing: 0;
}

.desktop-license-state {
  font-size: 11px;
  font-weight: 900;
}

.desktop-license-summary {
  color: #5a716d;
  font-size: 10px;
  font-weight: 700;
}

.desktop-license-countdown {
  color: #236f65;
  font-size: 10px;
  font-weight: 850;
}

.desktop-license-status-button.license-tone-warning {
  border-color: #d7b15f;
  color: #76500d;
  background: #fffaf0;
}

.desktop-license-status-button.license-tone-blocked {
  border-color: #d49a96;
  color: #8e3733;
  background: #fff6f5;
}

.desktop-license-modal-layer,
.desktop-license-blocking-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(11, 38, 35, .68);
}

.desktop-license-details-layer {
  z-index: 1010;
}

.desktop-license-dialog,
.desktop-license-blocking-panel {
  width: min(100%, 560px);
  max-height: calc(100vh - 40px);
  overflow: auto;
  border: 1px solid #b9d0cc;
  border-radius: 8px;
  padding: 20px;
  color: #173f3a;
  background: #fff;
  box-shadow: 0 20px 58px rgba(4, 31, 28, .3);
}

.desktop-license-dialog h2,
.desktop-license-blocking-panel h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.3;
  letter-spacing: 0;
}

.desktop-license-dialog > p,
.desktop-license-blocking-panel > p {
  margin: 12px 0 0;
  color: #526c67;
  font-size: 13px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.desktop-license-dialog-header {
  min-height: 38px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.desktop-license-icon-button {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border: 1px solid #bdd2ce;
  border-radius: 5px;
  color: #275d56;
  background: #f5faf8;
  font-size: 21px;
  line-height: 1;
  font-weight: 850;
}

.desktop-license-fields {
  display: grid;
  margin: 16px 0 0;
  border-top: 1px solid #d8e5e2;
}

.desktop-license-field {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(120px, .72fr) minmax(0, 1.28fr);
  gap: 16px;
  padding: 10px 2px;
  border-bottom: 1px solid #e2ece9;
}

.desktop-license-field dt {
  color: #607873;
  font-size: 12px;
  font-weight: 800;
}

.desktop-license-field dd {
  min-width: 0;
  margin: 0;
  color: #183e39;
  font-size: 12px;
  font-weight: 750;
  overflow-wrap: anywhere;
}

.desktop-license-dialog-actions,
.desktop-license-blocking-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 18px;
}

.desktop-license-primary-action,
.desktop-license-secondary-action {
  min-height: 38px;
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 850;
}

.desktop-license-primary-action {
  border: 1px solid #176d64;
  color: #fff;
  background: #176d64;
}

.desktop-license-secondary-action {
  border: 1px solid #b7ceca;
  color: #245f58;
  background: #f5faf8;
}

.desktop-license-grace-countdown {
  display: block;
  margin-top: 12px;
  color: #8a5a08;
  font-size: 15px;
}

.desktop-license-blocking-overlay {
  z-index: 990;
}

.desktop-license-blocking-panel {
  border-top: 5px solid #b64b46;
}

.desktop-license-blocking-actions {
  justify-content: flex-start;
}

.desktop-license-import-notice {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 1030;
  width: min(360px, calc(100% - 32px));
  min-height: 42px;
  border: 1px solid #adc7c2;
  border-radius: 6px;
  padding: 10px 12px;
  color: #173f3a;
  background: #fff;
  box-shadow: 0 10px 30px rgba(8, 50, 45, .2);
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.desktop-license-import-notice.notice-success {
  border-color: #7bb79b;
  color: #185c43;
  background: #f2fbf6;
}

.desktop-license-import-notice.notice-error {
  border-color: #d69a96;
  color: #8e3733;
  background: #fff6f5;
}

[data-license-disabled="true"] {
  opacity: .48 !important;
  cursor: not-allowed !important;
}

a[data-license-disabled="true"] {
  pointer-events: none;
}

@media (max-width: 700px) {
  .desktop-license-status-bar {
    padding-inline: 8px;
  }

  .desktop-license-status-button {
    grid-template-columns: minmax(74px, auto) minmax(0, 1fr);
  }

  .desktop-license-countdown {
    display: none;
  }

  .desktop-license-field {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .desktop-license-dialog-actions,
  .desktop-license-blocking-actions {
    align-items: stretch;
    flex-direction: column;
  }
}

@media print {
  .desktop-license-ui-root,
  .desktop-license-modal-layer,
  .desktop-license-blocking-overlay,
  .desktop-license-import-notice {
    display: none !important;
  }
}
