/* AUTOTUBE USER1 STYLE MODAL V2 — all new UI confined to modal */
.local-style-picker-fallback {
  display: none;
  place-items: center;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  color: #202020;
  font-size: 23px;
  background: linear-gradient(125deg, #f1edea, #e1e3e7);
}
.local-style-modal .local-style-section + .local-style-section {
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid rgba(16,16,16,.085);
}
.local-style-modal .local-style-group-title {
  margin: 0 0 14px;
  color: #181818;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 800;
}
.local-style-modal .local-style-group-note {
  margin: -6px 0 18px;
  color: #767676;
  font-size: 13px;
  line-height: 1.5;
}
.local-style-modal .local-style-category + .local-style-category {
  margin-top: 24px;
}
.local-style-modal .local-style-category-title {
  margin: 0 0 12px;
  color: #777;
  font-size: 13px;
  font-weight: 750;
}
.local-style-modal .local-style-graphic {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  background: linear-gradient(145deg, #eeecea, #d1d0cd);
  color: #595857;
}
.local-style-modal .local-style-graphic.category-animation {
  background: linear-gradient(145deg, #e5e9ff, #d3bde9);
  color: #6c508e;
}
.local-style-modal .local-style-graphic.category-comics {
  background: linear-gradient(145deg, #ffeec7, #e9bab4);
  color: #9a504f;
}
.local-style-modal .local-style-graphic.category-art {
  background: linear-gradient(145deg, #efeadc, #bfccb8);
  color: #617658;
}
.local-style-modal .local-style-graphic.category-explainer {
  background: linear-gradient(145deg, #d9e9f4, #bfdbdb);
  color: #3f6a79;
}
.local-style-modal .local-style-graphic.category-effects {
  background: linear-gradient(145deg, #e7c9e6, #bbbadc);
  color: #66528b;
}
.local-style-modal .local-style-graphic-symbol {
  font-size: 56px;
  font-weight: 400;
  line-height: 1;
}
.local-style-modal .local-style-loading {
  color: #737373;
  font-size: 14px;
  margin: 12px 0;
}
.local-style-modal .local-style-custom-row {
  display: flex;
  align-items: stretch;
  gap: 10px;
}
.local-style-modal #localStyleCustomInput {
  min-width: 0;
  flex: 1;
  min-height: 66px;
  resize: vertical;
  background: #fff;
  color: #222;
  border: 1px solid #dedede;
  border-radius: 12px;
  padding: 12px;
  font: inherit;
  font-size: 13px;
  line-height: 1.5;
}
.local-style-modal #localStyleCustomInput:focus {
  outline: none;
  border-color: #777;
}
.local-style-modal #localStyleCustomApply {
  flex: 0 0 auto;
  align-self: stretch;
  padding: 0 20px;
  border: none;
  border-radius: 12px;
  background: #141414;
  color: white;
  cursor: pointer;
  font-weight: 700;
}
.local-style-modal #localStyleCustomApply:hover {
  background: #333;
}
.local-style-modal #localStyleCustomApply.is-active {
  background: #333;
}
@media (max-width: 620px) {
  .local-style-modal .local-style-custom-row { flex-direction: column; }
  .local-style-modal #localStyleCustomApply { min-height: 43px; }
  .local-style-modal .local-style-graphic-symbol { font-size: 46px; }
}

.local-style-modal .local-style-card-image { display: block; }

/* USER1 STYLE GALLERY V3 — red header icon, horizontal filters, bold names */
.local-style-modal .local-style-modal-header {
  gap: 18px;
  flex-wrap: nowrap;
}
.local-style-modal .local-style-modal-title {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  flex: 0 0 auto;
  white-space: nowrap;
}
.local-style-modal .local-style-title-icon {
  width: 38px; height: 38px;
  display: inline-grid; place-items: center;
  background: rgba(215, 51, 65, .11);
  color: #d73341;
  border-radius: 12px;
  flex: 0 0 auto;
}
.local-style-modal .local-style-header-actions {
  min-width: 0; flex: 1 1 auto;
  display: flex; justify-content: flex-end; align-items: center;
  gap: 15px;
}
.local-style-modal .local-style-filters {
  display: flex; flex-wrap: nowrap; align-items: center; gap: 5px;
  min-width: 0; overflow-x: auto; padding: 3px 2px;
  scrollbar-width: thin;
}
.local-style-modal .local-style-filter-button {
  flex: 0 0 auto;
  border: 1px solid transparent;
  border-radius: 11px;
  padding: 9px 12px;
  background: #f00016;
  color: #ffffff;
  border-color: #f00016;
  box-shadow: 0 6px 14px rgba(240, 0, 22, .13);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  transition: background .15s, border-color .15s, box-shadow .15s;
}
.local-style-modal .local-style-filter-button:hover { background: #d90014; border-color: #d90014; color: #fff; }
.local-style-modal .local-style-filter-button.is-active {
  background: #c70012; border-color: #c70012; color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .40), 0 6px 14px rgba(240, 0, 22, .16);
}
.local-style-modal .local-style-filter-button.is-active:hover {
  background: #b80011; border-color: #b80011;
}
.local-style-modal .local-style-filter-button:focus-visible {
  outline: 2px solid #f00016; outline-offset: 3px;
}
.local-style-modal .local-style-card-name {
  font-weight: 850;
  letter-spacing: -.012em;
}
.local-style-modal .local-style-card.is-selected {
  border-color: #d73341;
  box-shadow: 0 0 0 2px rgba(215, 51, 65, .24), 0 10px 28px rgba(0, 0, 0, .08);
}
.local-style-modal .local-style-unified-grid { align-content: start; }
.local-style-modal .local-style-custom-section {
  margin-top: 26px; padding-top: 22px;
  border-top: 1px solid rgba(16,16,16,.08);
}
.local-style-modal .local-style-modal-body { padding-top: 23px; }
@media (max-width: 980px) {
  .local-style-modal .local-style-modal-header {
    flex-wrap: wrap;
    padding-bottom: 13px;
  }
  .local-style-modal .local-style-header-actions { flex: 1 1 100%; justify-content: space-between; }
  .local-style-modal .local-style-filters { flex: 1 1 auto; max-width: calc(100% - 52px); }
}
@media (max-width: 620px) {
  .local-style-modal .local-style-title-icon { width: 32px; height: 32px; border-radius: 10px; }
  .local-style-modal .local-style-filter-button { padding: 8px 9px; font-size: 11px; }
  .local-style-modal .local-style-filter-button:focus-visible { outline: 2px solid #d73341; outline-offset: 2px; }
}

/* Match the unboxed red icons in other AutoTube tab headings. */
.local-style-modal .local-style-title-icon {
  width: 28px; height: 28px;
  background: transparent;
  color: #F00016;
  border-radius: 0;
}
.local-style-modal .local-style-title-icon svg { width: 27px; height: 27px; }
.local-style-modal .local-style-preview-pending {
  width: 100%; height: 100%; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 13px;
  color: #77757d; background: #eae9eb;
  font-size: 13px; font-weight: 700;
}
.local-style-modal .local-style-preview-pending svg { opacity: .58; }
