.wp-grid[hidden],
.wp-filters[hidden],
.wp-library-status[hidden],
.wp-dialog [hidden] {
  display: none !important;
}

.wp-library-status {
  margin-top: 20px;
}

.wp-library-status button {
  margin-top: 8px;
}

.wp-card .wp-title,
.wp-card .wp-desc,
.wp-card .wp-bestfor,
.wp-dialog h2 {
  overflow-wrap: anywhere;
}

.wp-card .wp-chip {
  white-space: normal;
}

.wp-card .wp-actions button {
  font: inherit;
  cursor: pointer;
}

.wp-cover-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 16px;
  opacity: 0;
  transition: opacity .15s ease;
}

.wp-cover-image.is-loaded {
  opacity: 1;
}

.wp-card .wp-cover {
  position: relative;
}

.wp-cover-placeholder {
  position: absolute;
  inset: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 1px solid light-dark(#c9dedb, #3a5551);
  border-radius: 16px;
  color: light-dark(#426763, #b3d3cd);
  background: light-dark(#e9f3f1, #122723);
  font-size: .85rem;
  animation: wp-cover-pulse 1.8s ease-in-out infinite;
}

.wp-cover-placeholder-sheet {
  position: relative;
  width: 42px;
  height: 54px;
  border: 2px solid currentColor;
  border-radius: 7px;
}

.wp-cover-placeholder-sheet::after {
  content: "";
  position: absolute;
  inset: 15px 8px auto;
  height: 2px;
  background: currentColor;
  box-shadow: 0 8px currentColor, 0 16px currentColor;
}

@keyframes wp-cover-pulse {
  50% { opacity: .65; }
}

@media (prefers-reduced-motion: reduce) {
  .wp-cover-placeholder { animation: none; }
  .wp-cover-image { transition: none; }
}

html.wp-modal-open,
html.wp-modal-open body {
  overflow: hidden;
}

.wp-dialog {
  position: fixed;
  inset: 0;
  width: min(680px, calc(100% - 32px));
  max-width: none;
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 24px;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid light-dark(#d5e2e0, #334744);
  border-radius: 24px;
  color: light-dark(#102626, #e8f2f1);
  background: light-dark(#fff, #0a1515);
  box-shadow: 0 24px 90px rgb(0 0 0 / 30%);
}

.wp-dialog::backdrop {
  background: rgb(0 10 10 / 65%);
}

.wp-dialog-heading {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.wp-dialog h2 {
  flex: 1;
  margin: 0;
  font-size: 1.5rem;
  line-height: 1.3;
}

.wp-dialog-close {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border: 1px solid currentColor;
  border-radius: 50%;
  color: inherit;
  background: transparent;
  cursor: pointer;
  font-size: 1.5rem;
  line-height: 1;
}

.wp-dialog p {
  line-height: 1.5;
}

.wp-dialog iframe {
  display: block;
  width: 100%;
  max-width: 100%;
}

.wp-dialog a {
  color: inherit;
  text-decoration: underline;
}

.wp-dialog button:focus-visible,
.wp-dialog a:focus-visible,
.wp-card button:focus-visible,
.wp-filter:focus-visible {
  outline: 3px solid #269e9c;
  outline-offset: 4px;
}

@media (max-width: 480px) {
  .wp-dialog {
    width: calc(100% - 16px);
    max-height: calc(100dvh - 16px);
    padding: 16px;
    border-radius: 18px;
  }
}

/* A little extra room for the hosted form's CAPTCHA if it's enabled on a small screen. */
@media (max-width: 360px) {
  .wp-dialog {
    width: calc(100% - 4px);
    max-height: calc(100dvh - 4px);
    padding: 12px;
  }

  #wpFormContainer {
    margin-inline: -12px;
  }
}
