:root {
  /* Wider on desktop so the hero doesn't look "empty" */
  --dm-domain-max: 1040px;
}

/*
  /domains (Domain Search)
  Keep this file self-contained: layout injects it as a fallback for /domains.
*/

.dm-domain-hero {
  position: relative;
}

/* Local text utilities (this page is standalone, so define them here) */
.dm-domain-search .dm-label{
  display: block;
  font-weight: 700;
  font-size: 15px;
  line-height: 1.2;
  color: var(--dm-text, #0F172A);
  margin-bottom: 6px;
}

.dm-domain-search .dm-muted{
  color: var(--dm-muted, #64748B);
}

.dm-domain-search .dm-input{
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border-radius: 16px;
  border: 1px solid rgba(2, 6, 23, 0.12);
  background: #fff;
  color: var(--dm-text, #0F172A);
  font-size: 16px;
  -webkit-appearance: none;
  appearance: none;
}

/* iOS Safari: remove built-in search decorations so our styling is respected. */
.dm-domain-search input[type="search"].dm-input::-webkit-search-decoration,
.dm-domain-search input[type="search"].dm-input::-webkit-search-cancel-button,
.dm-domain-search input[type="search"].dm-input::-webkit-search-results-button,
.dm-domain-search input[type="search"].dm-input::-webkit-search-results-decoration{
  -webkit-appearance: none;
  display: none;
}

.dm-domain-search .dm-input:focus{
  outline: none;
  border-color: rgba(37, 99, 235, 0.55);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.16);
}

.dm-domain-hero__inner {
  max-width: var(--dm-domain-max);
  margin: 0 auto;
}

.dm-domain-hero__searchbar {
  display: flex;
  gap: 10px;
  align-items: stretch;
}

.dm-domain-hero__searchbar .dm-input {
  flex: 1;
  min-width: 0;
}

.dm-domain-hero__searchbar .btn {
  white-space: nowrap;
}

.dm-domain-hero__meta {
  margin-top: 10px;
}

.dm-domain-hero__actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 12px;
}

@media (max-width: 575px) {
  .dm-domain-hero__searchbar {
    flex-direction: column;
  }
  .dm-domain-hero__searchbar .btn {
    width: 100%;
  }
}

@media (min-width: 768px) {
  .dm-domain-hero__actions {
    justify-content: flex-end;
  }
}

/* Results */

.dm-domain-search__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.dm-domain-search__more {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-top: 14px;
}

/* Respect the HTML [hidden] attribute (author styles set display:flex above) */
.dm-domain-search__more[hidden]{
  display: none !important;
}

/* Result cards (compact on desktop) */

.dm-domain-result {
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 16px;
  padding: 12px;
  background: #fff;
  display: grid;
  /*
    IMPORTANT (iOS Safari landscape fix):
    Some Safari builds can fail to apply the modern `gap` shorthand reliably.
    Provide explicit row/column gaps + legacy grid-gap props.
  */
  grid-template-columns: minmax(0, 1fr) auto;
  row-gap: 10px;
  column-gap: 14px;
  grid-row-gap: 10px;
  grid-column-gap: 14px;
  gap: 10px 14px;
  align-items: start;
  transition: box-shadow .18s ease, transform .18s ease, border-color .18s ease;
}

/* Skeleton lines should span the full card width */
.dm-domain-result > .dm-skeleton__line{grid-column: 1 / -1;}

.dm-domain-result:hover{
  border-color: rgba(37,99,235,.18);
  box-shadow: 0 12px 34px rgba(2,6,23,.08);
  transform: translateY(-1px);
}

.dm-domain-result__left{
  min-width:0;
  /*
    Extra safety spacing between left and right columns.
    Helps prevent "domain+price" touching on narrow landscape layouts.
  */
  padding-right: 6px;
}

.dm-domain-result__domain {
  font-weight: 900;
  font-size: 18px;
  line-height: 1.18;
  margin: 0;
  /*
    Prevent domain labels from colliding with the price/actions column.
    Long/rare TLDs (e.g. .international) can overflow on tablet/landscape widths.
    We allow wrapping but clamp to 2 lines to keep cards compact.
  */
  overflow-wrap: anywhere;
  word-break: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.dm-domain-result__meta {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dm-domain-result__right{
  text-align: right;
  /* Allow the right column to shrink when space is tight (tablet/landscape). */
  min-width: 0;
}

.dm-domain-result__rightTop{
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  /* When space is tight, let price/button wrap instead of squeezing the left column. */
  flex-wrap: wrap;
}

.dm-domain-result__price {
  font-weight: 900;
  font-size: 17px;
  line-height: 1.15;
  white-space: nowrap;
}

.dm-domain-result__priceSub {
  margin-top: 4px;
  color: var(--dm-muted, #6b7280);
  font-size: 13px;
  white-space: nowrap;
}

.dm-domain-result__actions {
  display: flex;
}

.dm-domain-result__actions form {
  margin: 0;
}

.dm-domain-result__actions .btn{
  white-space: nowrap;
}

.dm-domain-result__note {
  grid-column: 1 / -1;
  margin-top: 6px;
  font-size: 13px;
  color: #6b7280;
}

@media (max-width: 575.98px){
  .dm-domain-result{grid-template-columns:1fr;}
  .dm-domain-result__left{padding-right:0;}
  .dm-domain-result__right{text-align:left;min-width:0;}
  .dm-domain-result__rightTop{justify-content:flex-start;flex-wrap:wrap;}
  .dm-domain-result__priceSub{white-space:normal;}
  .dm-domain-result__actions{width:100%;}
  .dm-domain-result__actions form{width:100%;}
  .dm-domain-result__actions .btn{width:100%;justify-content:center;}
}

/* Badges */

.dm-badge-success {
  background: rgba(34, 197, 94, 0.12) !important;
  color: #166534 !important;
}

.dm-badge-premium {
  background: rgba(59, 130, 246, 0.12) !important;
  color: #1d4ed8 !important;
}


.dm-badge-best {
  background: rgba(99, 102, 241, 0.14) !important;
  color: #4338ca !important;
}

.dm-badge-recommended {
  background: rgba(245, 158, 11, 0.14) !important;
  color: #92400e !important;
}

.dm-badge-popular {
  background: rgba(14, 165, 233, 0.14) !important;
  color: #0369a1 !important;
}

.dm-badge-muted {
  background: rgba(148, 163, 184, 0.18) !important;
  color: #475569 !important;
  border: 1px solid rgba(148, 163, 184, 0.35);
  opacity: 1 !important;
}

/* Overlay */

.dm-domain-search__results .dm-surface {
  position: relative;
}

.dm-domain-search__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(2px);
  z-index: 20;
}

/* Respect the HTML [hidden] attribute (author styles set display:flex above) */
.dm-domain-search__overlay[hidden]{
  display: none !important;
}

/* Results density on desktop (less empty space + less scroll) */
#dmDomainsPage #dmDomainResults{gap:16px;}

@media (min-width: 1200px){
  #dmDomainsPage #dmDomainResults{
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Helper text should not look tiny on large screens */
.dm-domain-search .small{font-size:0.95em;}

.dm-domain-search__overlayCard {
  width: min(520px, 92vw);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 16px;
  background: #fff;
  padding: 16px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.06);
}

.dm-skeleton__line {
  height: 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.08);
  margin-top: 10px;
}


/* Smart suggestions / domain ideas */
.dm-domain-ideas{
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(2, 6, 23, 0.08);
}
.dm-domain-ideas[hidden]{
  display:none !important;
}
.dm-domain-ideas__head{
  display:flex;
  flex-direction:column;
  gap:4px;
  margin-bottom:14px;
}
.dm-domain-ideas__groups{
  display:grid;
  gap:14px;
}
.dm-domain-ideas__group{
  border:1px solid rgba(2,6,23,.06);
  border-radius:18px;
  background:#fff;
  padding:14px;
}
.dm-domain-ideas__groupTitle{
  font-weight:800;
  color:var(--dm-text, #0f172a);
  margin-bottom:10px;
}
.dm-domain-ideas__list{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
}
.dm-domain-idea{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:12px 14px;
  border-radius:14px;
  border:1px solid rgba(37,99,235,.14);
  background:rgba(37,99,235,.03);
  color:inherit;
  text-decoration:none;
  transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.dm-domain-idea:hover{
  border-color:rgba(37,99,235,.26);
  box-shadow:0 10px 22px rgba(2,6,23,.06);
  transform:translateY(-1px);
}
.dm-domain-idea__name{
  min-width:0;
  font-weight:700;
  color:var(--dm-text, #0f172a);
  overflow-wrap:anywhere;
}
.dm-domain-idea__cta{
  flex:0 0 auto;
  font-size:13px;
  font-weight:800;
  color:var(--dm-primary, #2563eb);
  white-space:nowrap;
}
@media (max-width: 767.98px){
  .dm-domain-ideas__list{
    grid-template-columns:1fr;
  }
}


/* Smart Suggestions Engine v2 */
.dm-domain-ideas__list--v2{
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dm-domain-idea-card{
  border:1px solid rgba(2,6,23,.07);
  border-radius:18px;
  background:linear-gradient(180deg, rgba(255,255,255,1), rgba(248,250,252,.96));
  padding:14px;
  box-shadow:0 10px 24px rgba(2,6,23,.04);
}

.dm-domain-idea-card__top{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
}

.dm-domain-idea-card__name{
  font-weight:900;
  font-size:18px;
  line-height:1.1;
  color:var(--dm-text, #0f172a);
}

.dm-domain-idea-card__tag{
  margin-top:4px;
  font-size:13px;
  font-weight:700;
  color:var(--dm-muted, #64748b);
}

.dm-domain-idea-card__check{
  white-space:nowrap;
}

.dm-domain-idea-card__exts{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:12px;
}

.dm-extChip{
  display:inline-flex;
  align-items:center;
  padding:8px 10px;
  border-radius:999px;
  border:1px solid rgba(37,99,235,.15);
  background:rgba(37,99,235,.05);
  color:var(--dm-text, #0f172a);
  text-decoration:none;
  font-size:13px;
  font-weight:700;
  transition:background .18s ease, border-color .18s ease, transform .18s ease;
}

.dm-extChip:hover{
  background:rgba(37,99,235,.1);
  border-color:rgba(37,99,235,.28);
  transform:translateY(-1px);
}

.dm-domain-ideas__footer{
  margin-top:14px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  flex-wrap:wrap;
}

.dm-domain-ideas__footerText{
  color:var(--dm-muted, #64748b);
  font-size:14px;
}

@media (max-width: 767.98px){
  .dm-domain-ideas__list--v2{
    grid-template-columns:1fr;
  }
  .dm-domain-idea-card__top{
    flex-direction:column;
    align-items:flex-start;
  }
  .dm-domain-idea-card__check{
    width:100%;
    justify-content:center;
  }
}
