/* Font identify (WhatFontIs) - shared by Media Hub and Poster Lab */
.hub-fontid-launch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  margin-top: 0.55rem;
  width: 100%;
  padding: 0.42rem 0.6rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease;
}

.hub-fontid-launch:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.26);
}

.hub-fontid-overlay {
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(4, 6, 14, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.hub-fontid {
  display: flex;
  flex-direction: column;
  width: min(980px, 100%);
  max-height: min(88vh, 900px);
  border-radius: 16px;
  border: 1px solid #33383d;
  background: #14171a;
  overflow: hidden;
}

.hub-fontid__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 1.05rem 1.1rem 0.9rem;
  border-bottom: 1px solid #262b30;
}

.hub-fontid__head-copy {
  display: flex;
  align-items: baseline;
  gap: 0.65rem;
  min-width: 0;
}

.hub-fontid__title {
  margin: 0;
  font-family: 'Bebas Neue', sans-serif;
  font-weight: 400;
  font-size: 2.1rem;
  line-height: 1;
  letter-spacing: 0.03em;
  color: var(--hub-theme-accent, #58a8ff);
  white-space: nowrap;
}

.hub-fontid__show-name {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2.1rem;
  line-height: 1;
  letter-spacing: 0.03em;
  color: #f3f6ff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hub-fontid__close {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
}

.hub-fontid__close:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.hub-fontid__body {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.85fr);
  gap: 1rem;
  padding: 1rem 1.1rem;
  overflow: hidden;
  min-height: 0;
  flex: 1;
}

.hub-fontid__stage-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 0;
  min-height: 0;
}

.hub-fontid__stage {
  position: relative;
  display: inline-block;
  align-self: center;
  max-width: 100%;
  border-radius: 10px;
  overflow: hidden;
  background: #0c0e11;
  cursor: crosshair;
  touch-action: none;
  user-select: none;
}

.hub-fontid__img {
  display: block;
  max-width: 100%;
  max-height: calc(88vh - 240px);
  pointer-events: none;
}

.hub-fontid__selection {
  position: absolute;
  border: 2px solid #12cc5a;
  background: rgba(18, 204, 90, 0.14);
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.45);
  pointer-events: none;
}

.hub-fontid__loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 280px;
  min-height: 320px;
  padding: 1rem;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.85rem;
  text-align: center;
}

.hub-fontid__loading.is-error {
  color: #e08484;
}

.hub-fontid__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.62rem 1.1rem;
  border-top: 1px solid #262b30;
  background: rgba(255, 255, 255, 0.02);
}

.hub-fontid__hint {
  margin: 0;
  font-size: 0.74rem;
  color: #f3f6ff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hub-fontid__side {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
}

.hub-fontid__options {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.hub-fontid__option {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.5rem 0.6rem;
  border-radius: 10px;
  border: 1px solid var(--hub-solid-border, #33383d);
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.76rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.82);
  cursor: pointer;
  white-space: nowrap;
  transition: background 140ms ease, border-color 140ms ease;
}

.hub-fontid__option:hover {
  background: rgba(255, 255, 255, 0.08);
}

.hub-fontid__option:has(input:checked) {
  border-color: var(--hub-theme-accent, #58a8ff);
  background: color-mix(in srgb, var(--hub-theme-accent, #58a8ff) 14%, transparent);
}

.hub-fontid__option input[type="checkbox"] {
  accent-color: var(--hub-theme-accent, #58a8ff);
  width: 14px;
  height: 14px;
  margin: 0;
  cursor: pointer;
}

.hub-fontid__submit {
  width: 100%;
}

.hub-fontid__status {
  min-height: 1.1rem;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.6);
}

.hub-fontid__status.is-error {
  color: #e08484;
}

.hub-fontid__status.is-ok {
  color: #7fd89b;
}

.hub-fontid__settings-link {
  display: block;
  margin-top: 0.45rem;
}

.hub-fontid__results {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 0 0 auto;
}

.hub-fontid__result {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.65rem;
  border-radius: 10px;
  border: 1px solid #262b30;
  background: #191d21;
}

.hub-fontid__result-img-btn {
  flex: 0 0 auto;
  padding: 0;
  border: none;
  background: transparent;
  cursor: zoom-in;
  border-radius: 6px;
  line-height: 0;
  transition: transform 120ms ease;
}

.hub-fontid__result-img-btn:hover {
  transform: scale(1.04);
}

.hub-fontid__result-img {
  width: 96px;
  height: 34px;
  object-fit: contain;
  border-radius: 6px;
  background: #fff;
}

.hub-fontid-preview {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(4, 6, 14, 0.8);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.hub-fontid-preview__panel {
  display: flex;
  flex-direction: column;
  width: min(560px, 100%);
  max-height: 100%;
  border-radius: 14px;
  border: 1px solid #33383d;
  background: #14171a;
  overflow: hidden;
}

.hub-fontid-preview__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.7rem 0.95rem;
  border-bottom: 1px solid #262b30;
}

.hub-fontid-preview__title {
  font-size: 0.92rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.92);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hub-fontid-preview__close {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
}

.hub-fontid-preview__close:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.hub-fontid-preview__samples {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 0.85rem 0.95rem;
  overflow-y: auto;
}

.hub-fontid-preview__samples img {
  display: block;
  width: 100%;
  border-radius: 8px;
  background: #fff;
  padding: 0.55rem 0.7rem;
  box-sizing: border-box;
}

.hub-fontid__result-main {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
  flex: 1;
}

.hub-fontid__result-title {
  font-size: 0.84rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hub-fontid__result-meta {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.5);
}

.hub-fontid__result-type.is-free {
  color: #7fd89b;
  font-weight: 700;
}

.hub-fontid__result-type.is-commercial {
  color: #d7a84a;
  font-weight: 700;
}

.hub-fontid__result-actions {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  flex: 0 0 auto;
}

.hub-fontid__result-actions .hub-btn {
  padding: 0.3rem 0.45rem;
  min-width: 0;
}

.hub-fontid__attribution {
  flex: 0 0 auto;
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.55);
}

.hub-fontid__attribution a {
  color: var(--hub-theme-accent, #58a8ff);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

@media (max-width: 760px) {
  .hub-fontid__body {
    grid-template-columns: 1fr;
    overflow: auto;
  }

  .hub-fontid__side {
    overflow-y: visible;
  }

  .hub-fontid__img {
    max-height: 44vh;
  }

  .hub-fontid__footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }

  .hub-fontid__hint {
    white-space: normal;
  }
}

.hub-fontid-overlay .hub-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  font-family: 'Roboto', sans-serif;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  background: var(--hub-solid-control, #32363b);
  border: 1px solid var(--hub-solid-border, #33383d);
  color: rgba(255, 255, 255, 0.88);
  box-shadow: none;
  transition: border-color 0.15s ease, background 0.15s ease, filter 0.15s ease;
}

.hub-fontid-overlay .hub-btn:hover {
  border-color: rgba(255, 255, 255, 0.28);
}

.hub-fontid-overlay .hub-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
