/* Stüdyo — Dosyalarım / tasarım kaydı / şablon önerisi */

.awp-studio-lib-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.awp-studio-lib-heading {
  margin: 12px 0 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
}

/* Şablonlar paneli — compact */
#awp-studio-content-templates.awp-studio-content-section {
  display: none;
}

#awp-studio-content-templates.awp-studio-content-section--active {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.awp-studio-tpl-panel {
  min-width: 0;
}

.awp-studio-tpl-toolbar {
  display: flex;
  gap: 6px;
}

.awp-studio-tpl-action {
  flex: 1 1 0;
  min-width: 0;
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 32px;
  padding: 0 8px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #fff;
  color: #334155;
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  box-shadow: none;
  white-space: nowrap;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

.awp-studio-tpl-action .dashicons {
  font-size: 15px;
  width: 15px;
  height: 15px;
  line-height: 15px;
}

.awp-studio-tpl-action:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
  color: #0f172a;
}

.awp-studio-tpl-action--primary {
  background: #0f172a;
  border-color: #0f172a;
  color: #fff;
}

.awp-studio-tpl-action--primary:hover {
  background: #1e293b;
  border-color: #1e293b;
  color: #fff;
}

.awp-studio-tpl-action--admin {
  background: #fff;
  border-color: #fdba74;
  color: #c2410c;
}

.awp-studio-tpl-action--admin:hover {
  background: #fff7ed;
  border-color: #fb923c;
  color: #9a3412;
}

.awp-studio-tpl-tabs {
  display: flex;
  gap: 2px;
  padding: 2px;
  background: #f1f5f9;
  border-radius: 6px;
}

.awp-studio-tpl-tab {
  flex: 1 1 0;
  min-width: 0;
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 28px;
  padding: 0 6px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #64748b;
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
}

.awp-studio-tpl-tab > span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
}

.awp-studio-tpl-tab.is-active {
  background: #fff;
  color: #0f172a;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.awp-studio-tpl-tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 6px;
  background: #ea580c;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
}

.awp-studio-tpl-pane[hidden],
.awp-studio-tpl-pane:not(.is-active) {
  display: none;
}

.awp-studio-tpl-pane.is-active {
  display: block;
}

.awp-studio-tpl-panel .awp-studio-template-list,
.awp-studio-tpl-panel .awp-studio-my-designs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  max-height: none;
  overflow: visible;
  padding: 0;
}

.awp-studio-tpl-panel .awp-studio-template-empty,
.awp-studio-tpl-panel .awp-studio-prop-hint {
  grid-column: 1 / -1;
  margin: 8px 0 0;
  font-size: 12px;
}

.awp-studio-tpl-icon-btn {
  width: 26px;
  height: 26px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.96);
  color: #0f172a;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.18);
  cursor: pointer;
}

.awp-studio-tpl-icon-btn .dashicons {
  font-size: 14px;
  width: 14px;
  height: 14px;
  line-height: 14px;
}

.awp-studio-tpl-icon-btn:hover {
  background: #fff;
  color: #1d4ed8;
}

.awp-studio-tpl-icon-btn--danger {
  color: #dc2626;
}

.awp-studio-tpl-icon-btn--danger:hover {
  background: #fef2f2;
  color: #b91c1c;
}

/* Medya paneli — compact */
#awp-studio-content-media.awp-studio-content-section {
  display: none;
}

#awp-studio-content-media.awp-studio-content-section--active {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
  height: 100%;
}

.awp-studio-media-hint {
  margin: 0;
  flex-shrink: 0;
}

.awp-studio-media-toolbar {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.awp-studio-media-url-row {
  display: flex;
  gap: 6px;
  align-items: stretch;
  flex-shrink: 0;
}

.awp-studio-media-url-input {
  flex: 1 1 auto;
  min-width: 0;
  height: 34px;
  padding: 0 10px;
  border: 1px solid rgba(15, 23, 42, 0.14);
  border-radius: 8px;
  font-size: 12px;
  background: #fff;
  color: #0f172a;
}

.awp-studio-media-url-input:focus {
  outline: none;
  border-color: rgba(37, 99, 235, 0.55);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

.awp-studio-media-url-add {
  flex: 0 0 auto;
  min-height: 34px !important;
  height: 34px !important;
  padding: 0 10px !important;
  gap: 4px;
}

.awp-studio-media-url-status {
  margin: 0;
  font-size: 11px;
  line-height: 1.35;
  color: #047857;
  flex-shrink: 0;
}

.awp-studio-media-url-status.is-error {
  color: #b91c1c;
}

.awp-studio-media-tabs {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.awp-studio-media-tab {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 28px;
  padding: 4px 8px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.04);
  color: #334155;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

.awp-studio-media-tab.is-active {
  background: #0f172a;
  color: #fff;
}

.awp-studio-media-pane {
  display: none;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
  flex: 1 1 auto;
}

.awp-studio-media-pane.is-active {
  display: flex;
  min-height: 0;
  flex: 1 1 auto;
  overflow: hidden;
}

#awp-studio-media-pane-stock .awp-studio-media-stock-grid {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
}

.awp-studio-media-grid {
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.28) transparent;
  scrollbar-gutter: auto;
}

.awp-studio-media-grid:hover,
.awp-studio-media-grid:focus-within {
  scrollbar-color: rgba(100, 116, 139, 0.55) transparent;
}

.awp-studio-media-grid::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.awp-studio-media-grid::-webkit-scrollbar-button {
  display: none;
  width: 0;
  height: 0;
}

.awp-studio-media-grid::-webkit-scrollbar-track {
  background: transparent;
  margin: 4px 0;
}

.awp-studio-media-grid::-webkit-scrollbar-thumb {
  background-color: rgba(148, 163, 184, 0.28);
  background-clip: padding-box;
  border: 1px solid transparent;
  border-radius: 999px;
}

.awp-studio-media-grid:hover::-webkit-scrollbar-thumb,
.awp-studio-media-grid:focus-within::-webkit-scrollbar-thumb {
  background-color: rgba(100, 116, 139, 0.5);
}

.awp-studio-media-grid::-webkit-scrollbar-thumb:hover {
  background-color: rgba(71, 85, 105, 0.65);
}

.awp-studio-media-grid::-webkit-scrollbar-thumb:active {
  background-color: rgba(51, 65, 85, 0.8);
}

.awp-studio-media-grid::-webkit-scrollbar-corner {
  background: transparent;
}

.awp-studio-media-stock-more {
  flex: 0 0 auto;
  width: 100%;
  min-height: 32px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  color: #0f172a;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.awp-studio-media-stock-more[hidden] {
  display: none;
}

.awp-studio-media-search-row {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.awp-studio-media-search {
  flex: 1 1 auto;
  min-width: 0;
  height: 32px;
  padding: 0 10px;
  border: 1px solid rgba(15, 23, 42, 0.14);
  border-radius: 8px;
  font-size: 12px;
  background: #fff;
}

.awp-studio-media-stock-go {
  flex: 0 0 auto;
  min-height: 32px !important;
  height: 32px !important;
  padding: 0 10px !important;
}

.awp-studio-media-stock-providers {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  flex-shrink: 0;
}

.awp-studio-media-stock-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  flex-shrink: 0;
}

.awp-studio-media-stock-attrib {
  margin: 0;
  font-size: 10px;
  color: #64748b;
  flex-shrink: 0;
}

.awp-studio-media-stock-status {
  margin: 0;
  font-size: 11px;
  color: #475569;
  flex-shrink: 0;
}

.awp-studio-media-action {
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  height: auto !important;
  min-height: 44px;
  padding: 6px 8px !important;
  gap: 6px;
  text-align: left;
  text-transform: none;
  white-space: normal;
}

.awp-studio-media-action-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  min-width: 0;
  flex: 1 1 auto;
}

.awp-studio-media-action-title {
  font-size: 11px;
  font-weight: 700;
  line-height: 1.15;
  max-width: 100%;
}

.awp-studio-media-action-sub {
  font-size: 9px;
  font-weight: 500;
  line-height: 1.15;
  opacity: 0.72;
  max-width: 100%;
}

.awp-studio-tpl-action--primary .awp-studio-media-action-sub {
  opacity: 0.85;
}

.awp-studio-media-action-icon {
  flex-shrink: 0;
  font-size: 18px !important;
  width: 18px !important;
  height: 18px !important;
  line-height: 18px !important;
}

.awp-studio-media-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
  flex-shrink: 0;
}

.awp-studio-media-count {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  color: #94a3b8;
}

.awp-studio-media-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: auto;
  gap: 10px;
  align-content: start;
  align-items: start;
  overflow-y: auto;
  min-height: 0;
  flex: 1;
}

.awp-studio-media-empty {
  grid-column: 1 / -1;
  margin: 4px 0 0;
  font-size: 12px;
  line-height: 1.4;
  color: #64748b;
}

.awp-studio-media-card {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  display: block;
  width: 100%;
  height: 0;
  padding: 0 0 100%;
  margin: 0;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #f8fafc;
  overflow: hidden;
  cursor: pointer;
  box-shadow: none;
  min-width: 0;
  box-sizing: content-box;
  z-index: 0;
  transform: none;
}

.awp-studio-media-card:hover,
.awp-studio-media-card:focus-visible,
.awp-product-studio-mode .awp-studio-media-card:hover,
.awp-product-studio-mode .awp-studio-media-card:focus-visible {
  transform: none;
}

.awp-studio-media-card:focus-visible {
  outline: none;
}

.awp-studio-media-card img,
.awp-studio-media-card-fallback {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

.awp-studio-media-card-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8fafc;
  color: #94a3b8;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.awp-studio-media-card-add {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.96);
  color: #0f172a;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.18);
  opacity: 0;
  pointer-events: none;
}

.awp-studio-media-card:hover .awp-studio-media-card-add,
.awp-studio-media-card:focus-within .awp-studio-media-card-add {
  opacity: 1;
}

@media (hover: none) {
  .awp-studio-media-card-add {
    opacity: 1;
  }
}

.awp-studio-media-card-add .dashicons {
  font-size: 14px;
  width: 14px;
  height: 14px;
  line-height: 14px;
}

.awp-studio-lib-upload-row {
  display: flex;
  flex-direction: column;
  flex: none;
  gap: 6px;
  margin: 0;
}

.awp-studio-lib-upload-btn {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  flex-shrink: 0;
  align-self: stretch;
  width: 100%;
  height: 36px;
  min-height: 36px;
  margin: 0;
  padding: 0 12px;
  border: 1px solid #0f172a;
  border-radius: 6px;
  background: #0f172a;
  color: #fff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  box-sizing: border-box;
  box-shadow: none;
}

.awp-studio-lib-upload-btn:hover {
  background: #1e293b;
  border-color: #1e293b;
  color: #fff;
}

.awp-studio-lib-upload-hint {
  margin: 0;
  font-size: 11px;
  line-height: 1.4;
  color: #94a3b8;
}

.awp-studio-lib-status {
  min-height: 1.2em;
  margin: 0;
  font-size: 11px;
  color: #64748b;
}

.awp-studio-lib-status.is-error {
  color: #b91c1c;
}

#awp-studio-content-library.awp-studio-content-section {
  display: none;
}

#awp-studio-content-library.awp-studio-content-section--active {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
  height: 100%;
}

.awp-studio-lib-grid,
.awp-studio-my-designs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  align-content: start;
  overflow-y: auto;
  min-height: 0;
  flex: 1;
  padding: 6px 4px 8px 6px;
  box-sizing: border-box;
}

.awp-studio-lib-grid > .awp-studio-prop-hint {
  grid-column: 1 / -1;
  margin: 0;
}

.awp-studio-lib-card,
.awp-studio-my-design-item {
  border: 1px solid #e2e8f0;
  border-radius: 3px;
  background: #fff;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: none;
}

.awp-studio-lib-card:hover,
.awp-studio-my-design-item:hover {
  transform: none;
}

.awp-studio-lib-thumb {
  aspect-ratio: 4 / 3;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 6px;
  box-sizing: border-box;
  border-radius: 3px 3px 0 0;
}

.awp-studio-lib-thumb img,
.awp-studio-lib-thumb-canvas {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
  flex: 0 0 auto;
  background: transparent;
}

.awp-studio-lib-card:hover .awp-studio-lib-card-actions .awp-studio-prop-btn--primary,
.awp-studio-lib-card:hover .awp-studio-lib-card-actions .awp-studio-prop-btn--primary:hover,
.awp-product-studio-mode .awp-studio-lib-card:hover .awp-studio-lib-card-actions .awp-studio-prop-btn--primary,
.awp-product-studio-mode .awp-studio-lib-card:hover .awp-studio-lib-card-actions .awp-studio-prop-btn--primary:hover {
  color: #fff;
  -webkit-text-fill-color: #fff;
  background: #4f46e5;
  border-color: #4f46e5;
}

.awp-studio-lib-card:hover .awp-studio-lib-card-actions .awp-studio-prop-btn--primary:hover,
.awp-product-studio-mode .awp-studio-lib-card:hover .awp-studio-lib-card-actions .awp-studio-prop-btn--primary:hover {
  background: #3730a3;
  border-color: #3730a3;
  box-shadow: 0 6px 16px rgba(79, 70, 229, 0.45);
}

/* Kullanıcı tasarım önizlemeleri: yatay/dikey her boyutta tam göster (kırpma yok) */
.awp-studio-my-design-item .awp-studio-template-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
  background: #fff;
}

.awp-studio-lib-file-icon {
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  letter-spacing: 0.04em;
}

.awp-studio-lib-meta {
  padding: 6px 8px 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.awp-studio-lib-meta strong,
.awp-studio-my-design-item strong {
  font-size: 11px;
  line-height: 1.3;
  color: #0f172a;
}

.awp-studio-lib-meta span {
  font-size: 10px;
  color: #64748b;
}

.awp-studio-lib-card-actions {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  gap: 4px;
  padding: 6px 8px 8px;
  margin-top: auto;
  overflow: visible;
}

.awp-studio-lib-card-actions .awp-studio-prop-btn {
  position: relative;
  flex: 0 0 auto;
  width: 100%;
  height: auto;
  min-height: 28px;
  padding: 6px 8px;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0;
  text-transform: none;
  white-space: normal;
  overflow: visible;
  text-align: center;
  word-break: break-word;
  border-radius: 3px;
}

.awp-studio-lib-card-actions .awp-studio-prop-btn--primary {
  background: #4f46e5;
  border-color: #4f46e5;
  color: #fff;
  -webkit-text-fill-color: #fff;
}

.awp-studio-lib-card-actions .awp-studio-prop-btn--primary:hover {
  background: #3730a3;
  border-color: #3730a3;
  color: #fff;
  -webkit-text-fill-color: #fff;
  box-shadow: 0 6px 16px rgba(79, 70, 229, 0.45);
}

.awp-studio-lib-card-actions .awp-studio-prop-btn:not(.awp-studio-prop-btn--primary):hover {
  background: #fff1f2;
  border-color: #e11d48;
  color: #be123c;
  -webkit-text-fill-color: #be123c;
  box-shadow: 0 6px 16px rgba(225, 29, 72, 0.28);
}

.awp-studio-lib-card-actions .awp-studio-prop-btn[data-tip]::after {
  content: attr(data-tip);
  position: absolute;
  z-index: 8;
  left: 0;
  right: 0;
  bottom: calc(100% + 4px);
  padding: 6px 7px;
  border-radius: 3px;
  background: #0f172a;
  color: #fff;
  -webkit-text-fill-color: #fff;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: 0;
  text-align: left;
  text-transform: none;
  white-space: normal;
  pointer-events: none;
  opacity: 0;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.28);
}

.awp-studio-lib-card-actions .awp-studio-prop-btn[data-tip]:hover::after,
.awp-studio-lib-card-actions .awp-studio-prop-btn[data-tip]:focus-visible::after {
  opacity: 1;
}

.awp-studio-pending-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  margin-bottom: 6px;
  font-size: 12px;
  background: #f8fafc;
}

.awp-studio-pending-badge {
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 700;
  color: #c2410c;
  background: #fff7ed;
  border: 1px solid #fdba74;
  border-radius: 6px;
  padding: 2px 6px;
}

/* Admin moderation */
.awp-studio-mod-wrap {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid #e2e8f0;
}

.awp-studio-mod-card {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #fff;
  margin-bottom: 10px;
}

.awp-studio-mod-card-main {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  min-width: 0;
  flex: 1;
}

.awp-studio-mod-thumb {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 6px;
  background: #f1f5f9;
  flex-shrink: 0;
}

.awp-studio-mod-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Çizim / İkon / Harita */
.awp-studio-draw-block {
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.awp-studio-draw-tools {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
}

.awp-studio-draw-field {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 36px;
}

.awp-studio-draw-field--width {
  flex: 1 1 auto;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  min-height: 0;
}

.awp-studio-draw-field-label {
  flex: 0 0 auto;
  min-width: 56px;
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #64748b;
}

.awp-studio-draw-field--width .awp-studio-draw-field-label {
  min-width: 0;
  width: 100%;
}

.awp-studio-draw-color-input {
  width: 36px;
  height: 36px;
  padding: 0;
  border: 2px solid rgba(15, 23, 42, 0.12);
  border-radius: 3px !important;
  background: #fff;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  appearance: none;
  -webkit-appearance: none;
  overflow: hidden;
}

.awp-product-studio-mode .awp-studio-draw-color-input {
  width: 36px !important;
  height: 36px !important;
  padding: 0 !important;
  border-radius: 3px !important;
}

.awp-studio-draw-color-input::-webkit-color-swatch-wrapper {
  padding: 0;
}

.awp-studio-draw-color-input::-webkit-color-swatch,
.awp-studio-draw-color-input::-moz-color-swatch {
  border: 0;
  border-radius: 1px;
}

.awp-studio-draw-color-input:hover,
.awp-studio-draw-color-input:focus-visible {
  border-color: #e11d48;
  box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.18);
  outline: none;
}

.awp-studio-draw-width-control {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-width: 0;
  padding: 4px 6px 4px 12px;
  border-radius: 999px;
  background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
  box-sizing: border-box;
}

.awp-studio-draw-width-range {
  flex: 1 1 auto;
  min-width: 0;
  width: auto !important;
  max-width: none !important;
  height: 28px;
  margin: 0;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  cursor: pointer;
}

.awp-studio-draw-width-range:focus {
  outline: none;
}

.awp-studio-draw-width-range:focus-visible::-webkit-slider-thumb {
  box-shadow: 0 0 0 4px rgba(225, 29, 72, 0.25), 0 2px 6px rgba(225, 29, 72, 0.45);
}

.awp-studio-draw-width-range::-webkit-slider-runnable-track {
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    #e11d48 0%,
    #e11d48 var(--awp-draw-width-pct, 8%),
    #cbd5e1 var(--awp-draw-width-pct, 8%),
    #cbd5e1 100%
  );
}

.awp-studio-draw-width-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  margin-top: -5px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff 0%, #ffe4e6 35%, #e11d48 70%);
  border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(225, 29, 72, 0.45), 0 0 0 1px rgba(190, 18, 60, 0.35);
  transition: transform 0.12s ease;
}

.awp-studio-draw-width-range:active::-webkit-slider-thumb {
  transform: scale(1.12);
}

.awp-studio-draw-width-range::-moz-range-track {
  height: 8px;
  border-radius: 999px;
  background: #cbd5e1;
}

.awp-studio-draw-width-range::-moz-range-progress {
  height: 8px;
  border-radius: 999px;
  background: #e11d48;
}

.awp-studio-draw-width-range::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #e11d48;
  border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(225, 29, 72, 0.45);
}

.awp-studio-draw-width-val {
  flex: 0 0 auto;
  min-width: 3.25rem;
  padding: 4px 8px;
  border-radius: 999px;
  background: #0f172a;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.25);
}

.awp-studio-draw-mode-row {
  display: flex;
  gap: 6px;
  margin-bottom: 6px;
}

#awp-studio-draw-hint {
  margin-bottom: 12px;
}

.awp-studio-draw-style-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  margin: 0 0 8px;
}

.awp-studio-draw-style-btn {
  flex: 1 1 calc(50% - 6px);
  min-width: 0;
  min-height: 32px;
  padding: 6px 8px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 3px;
  background: #fff;
  color: #475569;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.awp-studio-draw-style-btn--icon {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 3px !important;
}

.awp-studio-draw-style-btn--icon svg {
  display: block;
  width: 22px;
  height: 22px;
  pointer-events: none;
}

.awp-studio-draw-esc-hint {
  font-size: 11px;
  color: #94a3b8;
  line-height: 1.3;
  align-self: center;
}

.awp-studio-draw-style-btn:hover {
  border-color: rgba(15, 23, 42, 0.22);
  color: #0f172a;
}

.awp-studio-draw-style-btn.is-active {
  background: #0f172a;
  border-color: #0f172a;
  color: #fff;
}

.awp-studio-draw-status {
  margin: 0;
  font-size: 11px;
  color: #475569;
}

.awp-studio-draw-overlay {
  cursor: crosshair;
}

.awp-studio-icons-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: max-content;
  align-content: start;
  align-items: start;
  column-gap: 6px;
  row-gap: 8px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: auto;
  flex: 0 0 auto;
  overflow: visible;
  padding: 2px 2px 8px;
}

.awp-studio-icon-card {
  aspect-ratio: 1 / 1;
  width: 100%;
  height: auto;
  min-width: 0;
  min-height: 0;
  max-width: 100%;
  align-self: start;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  box-shadow: none;
  box-sizing: border-box;
}

.awp-studio-icon-card:hover:not(.selected),
.awp-studio-icon-card:focus-visible:not(.selected),
.awp-product-studio-mode .awp-studio-icon-card:hover:not(.selected),
.awp-product-studio-mode .awp-studio-icon-card:focus-visible:not(.selected) {
  transform: none !important;
}

.awp-studio-icon-card:active {
  transform: none;
}

.awp-studio-icon-card.selected {
  border-color: #ea580c;
  background: #fff7ed;
  box-shadow: none;
}

.awp-studio-icon-card img {
  width: 70%;
  height: 70%;
  object-fit: contain;
  pointer-events: none;
}

.awp-studio-maps-preview {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
  flex: 0 0 auto !important;
}

.awp-studio-maps-preview[hidden] {
  display: none !important;
}

.awp-studio-maps-preview img {
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: #f8fafc;
}

.awp-studio-maps-builder {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
}

.awp-studio-maps-step {
  margin: 4px 0 0;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
}

.awp-studio-maps-results {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 140px;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 2px;
  min-width: 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(100, 116, 139, 0.4) transparent;
}

.awp-studio-maps-results::-webkit-scrollbar {
  width: 5px;
  height: 0;
}

.awp-studio-maps-results::-webkit-scrollbar-button {
  display: none;
  width: 0;
  height: 0;
}

.awp-studio-maps-results::-webkit-scrollbar-track {
  background: transparent;
}

.awp-studio-maps-results::-webkit-scrollbar-thumb {
  background: rgba(100, 116, 139, 0.4);
  border-radius: 999px;
}

.awp-studio-maps-results[hidden] {
  display: none !important;
}

.awp-studio-maps-result {
  appearance: none;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 8px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  color: #0f172a;
  font: inherit;
  font-size: 11px;
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

.awp-studio-maps-result:hover {
  border-color: #0f172a;
  background: #0f172a;
  color: #f8fafc;
}

.awp-studio-maps-result.is-active {
  border-color: #2563eb;
  background: #1e3a8a;
  color: #eff6ff;
  box-shadow: none;
}

.awp-studio-maps-result.is-active:hover {
  background: #1d4ed8;
  border-color: #1d4ed8;
  color: #fff;
}

.awp-studio-maps-options[hidden] {
  display: none !important;
}

.awp-studio-maps-options {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.awp-studio-maps-chips,
.awp-studio-maps-styles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.awp-studio-maps-chip,
.awp-studio-maps-style {
  appearance: none;
  margin: 0;
  padding: 8px 6px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  color: #334155;
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-height: 36px;
  justify-content: center;
}

.awp-studio-maps-chip.is-active,
.awp-studio-maps-style.is-active {
  border-color: #0f172a;
  background: #0f172a;
  color: #fff;
}

.awp-studio-maps-style-swatch {
  width: 100%;
  height: 28px;
  border-radius: 6px;
  border: 1px solid rgba(15, 23, 42, 0.12);
}

.awp-studio-maps-style-swatch--streets {
  background: linear-gradient(135deg, #c7f0c2 0%, #f6e7c1 45%, #bcd4f0 100%);
}

.awp-studio-maps-style-swatch--light {
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

.awp-studio-maps-style-swatch--dark {
  background: linear-gradient(135deg, #0f172a 0%, #334155 100%);
}

.awp-studio-maps-style.is-active .awp-studio-maps-style-swatch {
  border-color: rgba(255, 255, 255, 0.35);
}

