/* ==========================================================================
   GCC Media Picker – Modern Redesign
   Aspect: 9:16 mobile-first, responsive up to desktop
   ========================================================================== */

/* ── Tokens ── */
:root {
  --mp-accent: #6366f1;
  --mp-accent-hover: #4f46e5;
  --mp-accent-light: #ede9fe;
  --mp-radius: 16px;
  --mp-radius-sm: 10px;
  --mp-border: rgba(0,0,0,.08);
  --mp-bg: #fff;
  --mp-bg-secondary: #f8f8fb;
  --mp-text: #111827;
  --mp-muted: #6b7280;
  --mp-scrollbar: transparent;
}
@media (prefers-color-scheme: dark) {
  :root {
    --mp-border: rgba(255,255,255,.1);
    --mp-bg: #161618;
    --mp-bg-secondary: #1e1e22;
    --mp-text: #f0f0f2;
    --mp-muted: #9ca3af;
  }
}

/* ── Overlay ── */
.gcc-mp-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 99999;
  align-items: center;
  justify-content: center;
  padding: 12px;
}
.gcc-mp-overlay.gcc-mp-open { display: flex; }

/* ── Modal box ── */
.gcc-mp-box {
  background: var(--mp-bg);
  border-radius: var(--mp-radius);
  width: 100%;
  max-width: 420px;
  height: 90svh;
  max-height: 780px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--mp-border);
}
@media (min-width: 700px) {
  .gcc-mp-box {
    max-width: 900px;
    width: 92vw;
    height: 82vh;
    max-height: 720px;
  }
}

/* ── Header ── */
.gcc-mp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--mp-border);
  flex-shrink: 0;
  gap: 10px;
}

.gcc-mp-title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--mp-text);
  letter-spacing: -.01em;
}

.gcc-mp-close {
  background: var(--mp-bg-secondary) !important;
  border: 1px solid var(--mp-border) !important;
  font-size: 14px !important;
  cursor: pointer;
  color: var(--mp-muted) !important;
  padding: 0 !important;
  width: 28px !important;
  height: 28px !important;
  min-width: 28px !important;
  min-height: 28px !important;
  max-width: 28px !important;
  border-radius: 50% !important;
  line-height: 1 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: background .15s !important;
  flex-shrink: 0;
  margin: 0 !important;
}
.gcc-mp-close:hover {
  background: var(--mp-border) !important;
  color: var(--mp-text) !important;
}

/* ── Type tabs ── */
.gcc-mp-type-tabs {
  display: flex;
  gap: 4px;
  padding: 8px 12px 0;
  flex-shrink: 0;
  flex-wrap: wrap;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.gcc-mp-type-tabs::-webkit-scrollbar { display: none; }

.gcc-mp-type-tab {
  background: none !important;
  border: 1px solid var(--mp-border) !important;
  border-radius: 20px !important;
  padding: 3px 10px !important;
  font-size: 12px !important;
  cursor: pointer;
  color: var(--mp-muted) !important;
  transition: all .15s !important;
  white-space: nowrap;
  height: auto !important;
  min-height: auto !important;
  min-width: auto !important;
  line-height: 1.5 !important;
  margin: 0 !important;
  letter-spacing: 0 !important;
  font-weight: 500 !important;
}
.gcc-mp-type-tab:hover  { border-color: var(--mp-accent) !important; color: var(--mp-accent) !important; }
.gcc-mp-type-tab.active { background: var(--mp-accent) !important; border-color: var(--mp-accent) !important; color: #fff !important; }

/* ── Filter bar ── */
.gcc-mp-filter-bar {
  display: flex;
  gap: 6px;
  padding: 6px 12px;
  border-bottom: 1px solid var(--mp-border);
  flex-shrink: 0;
  flex-wrap: nowrap;
  align-items: center;
}
@media (max-width: 699px) {
  .gcc-mp-filter-bar {
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 4px;
    padding: 6px 10px;
  }
  .gcc-mp-cat-tabs {
    order: 2;
    flex: none;
    width: 100%;
  }
  .gcc-mp-search {
    order: 1;
    width: 100% !important;
    max-width: 100% !important;
    padding: 5px 10px !important;
    font-size: 13px !important;
    height: auto !important;
    min-height: auto !important;
    max-height: none !important;
    line-height: 1.5 !important;
    box-sizing: border-box !important;
  }
  .gcc-mp-search:focus {
    width: 100% !important;
    max-width: 100% !important;
  }
}

.gcc-mp-cat-tabs {
  display: flex;
  gap: 4px;
  flex-wrap: nowrap;
  flex: 1;
  overflow-x: auto;
  scrollbar-width: none;
  min-width: 0;
}
.gcc-mp-cat-tabs::-webkit-scrollbar { display: none; }

.gcc-mp-cat-tab {
  background: none !important;
  border: 1px solid var(--mp-border) !important;
  border-radius: var(--mp-radius-sm) !important;
  padding: 3px 9px !important;
  font-size: 12px !important;
  cursor: pointer;
  color: var(--mp-muted) !important;
  transition: all .15s !important;
  white-space: nowrap;
  height: auto !important;
  min-height: auto !important;
  min-width: auto !important;
  line-height: 1.5 !important;
  margin: 0 !important;
  letter-spacing: 0 !important;
}
.gcc-mp-cat-tab:hover  { border-color: var(--mp-accent) !important; color: var(--mp-accent) !important; }
.gcc-mp-cat-tab.active { background: var(--mp-accent-light) !important; border-color: var(--mp-accent) !important; color: var(--mp-accent-hover) !important; }

.gcc-mp-search {
  border: 1px solid var(--mp-border) !important;
  border-radius: var(--mp-radius-sm) !important;
  padding: 5px 10px !important;
  font-size: 13px !important;
  width: 140px !important;
  max-width: 140px !important;
  min-width: 0 !important;
  outline: none !important;
  background: var(--mp-bg-secondary) !important;
  color: var(--mp-text) !important;
  transition: border .15s, width .2s !important;
  height: auto !important;
  min-height: auto !important;
  box-sizing: border-box !important;
}
.gcc-mp-search:focus {
  border-color: var(--mp-accent) !important;
  width: 200px !important;
  max-width: 200px !important;
  outline: none !important;
  box-shadow: 0 0 0 3px rgba(99,102,241,.12) !important;
}
@media (max-width: 699px) {
  .gcc-mp-search,
  .gcc-mp-search:focus { width: 100% !important; max-width: 100% !important; }
}

/* ── Body ── */
.gcc-mp-body {
  display: grid;
  grid-template-columns: 1fr;
  flex: 1;
  overflow: hidden;
  min-height: 0;
}
@media (min-width: 700px) {
  .gcc-mp-body { grid-template-columns: 1fr 240px; }
}

/* ── Grid ── */
.gcc-mp-grid {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  column-gap: 6px !important;
  row-gap: 6px !important;
  padding: 10px;
  overflow-y: auto;
  align-content: start;
  scrollbar-width: none;
  -ms-overflow-style: none;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  background: var(--mp-border);
}
.gcc-mp-grid::-webkit-scrollbar { display: none; }
@media (min-width: 700px) {
  .gcc-mp-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 8px;
    padding: 12px;
  }
}

.gcc-mp-loading, .gcc-mp-empty, .gcc-mp-error {
  grid-column: 1 / -1;
  padding: 40px 20px;
  text-align: center;
  color: var(--mp-muted);
  font-size: 14px;
}
.gcc-mp-error { color: #dc2626; }

/* ── Media card ── */
.gcc-mp-card {
  border: 2px solid transparent !important;
  border-radius: var(--mp-radius-sm) !important;
  overflow: hidden !important;
  cursor: pointer;
  background: var(--mp-bg-secondary);
  transition: border-color .15s, transform .1s;
  position: relative !important;
  min-width: 0 !important;
  width: 100% !important;
  box-sizing: border-box !important;
  height: 0 !important;
  padding-bottom: 100% !important;
  min-height: 0 !important;
  aspect-ratio: unset !important;
}
.gcc-mp-card > * {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
}
.gcc-mp-card:hover    { border-color: rgba(99,102,241,.5); transform: translateY(-2px); }
.gcc-mp-card.selected { border-color: var(--mp-accent); background: rgba(99,102,241,.04); }

.gcc-mp-thumb {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
  position: absolute !important;
  inset: 0 !important;
}

.gcc-mp-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 2rem;
  background: var(--mp-accent-light);
}

.gcc-mp-audio {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 10px 6px;
  height: 100%;
  box-sizing: border-box;
}
.gcc-mp-audio-icon { font-size: 1.6rem; }
.gcc-mp-audio-name {
  font-size: 10px;
  font-weight: 600;
  color: var(--mp-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 90px;
  text-align: center;
}
.gcc-mp-audio-meta { font-size: 10px; color: var(--mp-muted); }

.gcc-mp-play-btn {
  background: var(--mp-accent) !important;
  border: none !important;
  border-radius: 50% !important;
  width: 24px !important;
  height: 24px !important;
  min-width: 24px !important;
  min-height: 24px !important;
  max-width: 24px !important;
  font-size: 10px !important;
  color: #fff !important;
  cursor: pointer;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  margin: 0 !important;
}
.gcc-mp-play-btn:hover { background: var(--mp-accent-hover) !important; }

.gcc-mp-image, .gcc-mp-video, .gcc-mp-model, .gcc-mp-generic {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 8px 6px;
  height: 100%;
  box-sizing: border-box;
  position: relative;
}

/* Thumbnail thật cho image/video/model — phủ toàn bộ card */
.gcc-mp-image-thumb,
.gcc-mp-video-thumb,
.gcc-mp-model-thumb {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
  border-radius: 0 !important;
  z-index: 0;
}

/* Badge type-label nổi lên trên thumbnail */
.gcc-mp-video .gcc-mp-type-label,
.gcc-mp-model .gcc-mp-type-label {
  position: absolute;
  top: 6px;
  left: 6px;
  z-index: 2;
  opacity: .92;
}

/* Tên file nổi lên dưới cùng thumbnail */
.gcc-mp-image .gcc-mp-file-name,
.gcc-mp-video .gcc-mp-file-name,
.gcc-mp-model .gcc-mp-file-name,
.gcc-mp-model .gcc-mp-file-meta {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 2;
  background: linear-gradient(transparent, rgba(0,0,0,.6));
  color: #fff !important;
  padding: 14px 6px 4px;
  text-align: center;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  -webkit-line-clamp: unset;
  display: block;
}

.gcc-mp-model .gcc-mp-file-meta {
  display: none;
}

.gcc-mp-type-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--mp-accent);
  background: var(--mp-accent-light);
  border-radius: 4px;
  padding: 1px 5px;
  text-transform: uppercase;
}

.gcc-mp-file-name {
  font-size: 10px;
  color: var(--mp-text);
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  width: 100%;
  max-width: 100%;
  line-height: 1.3;
  word-break: break-word;
  box-sizing: border-box;
}
.gcc-mp-file-meta { font-size: 9px; color: var(--mp-muted); }

/* ── Detail panel ── */
.gcc-mp-detail {
  border-left: 1px solid var(--mp-border);
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
  min-height: 0;
  scrollbar-width: none;
  gap: 12px;
  background: var(--mp-bg-secondary);
}
.gcc-mp-detail::-webkit-scrollbar { display: none; }
@media (max-width: 699px) { .gcc-mp-detail { display: none; } }

.gcc-mp-detail-placeholder {
  text-align: center;
  color: var(--mp-muted);
  font-size: 13px;
}
.gcc-mp-detail-img {
  width: 100%;
  max-width: 180px;
  border-radius: var(--mp-radius-sm);
  display: block;
}
.gcc-mp-detail-audio {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
}
.gcc-mp-detail-audio-icon { font-size: 2.5rem; }
.gcc-mp-detail-audio-name { font-size: 12px; font-weight: 600; text-align: center; color: var(--mp-text); }
.gcc-mp-detail-player { width: 100%; }
.gcc-mp-detail-video, .gcc-mp-detail-model { width: 100%; }
.gcc-mp-model-hint { font-size: 11px; color: var(--mp-muted); text-align: center; margin-top: 6px; }
.gcc-mp-detail-generic { text-align: center; color: var(--mp-muted); }

/* ── Footer ── */
.gcc-mp-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 12px;
  border-top: 1px solid var(--mp-border);
  flex-shrink: 0;
  gap: 8px;
  flex-wrap: nowrap;
}

.gcc-mp-pagination {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
  min-width: 0;
}
.gcc-mp-page-info { font-size: 11px; color: var(--mp-muted); white-space: nowrap; }

/* ── Buttons (override Flatsome) ── */
.gcc-mp-btn {
  border-radius: var(--mp-radius-sm) !important;
  padding: 7px 14px !important;
  font-size: 13px !important;
  cursor: pointer;
  transition: background .15s, opacity .15s !important;
  white-space: nowrap;
  height: auto !important;
  min-height: auto !important;
  line-height: 1.4 !important;
  letter-spacing: 0 !important;
  margin: 0 !important;
  font-weight: 500 !important;
}
.gcc-mp-btn:disabled { opacity: .45 !important; cursor: not-allowed; }

.gcc-mp-btn--ghost {
  background: var(--mp-bg-secondary) !important;
  color: var(--mp-text) !important;
  border: 1px solid var(--mp-border) !important;
}
.gcc-mp-btn--ghost:hover:not(:disabled) { background: var(--mp-border) !important; }

.gcc-mp-btn--primary {
  background: var(--mp-accent) !important;
  color: #fff !important;
  border: none !important;
}
.gcc-mp-btn--primary:hover:not(:disabled) { background: var(--mp-accent-hover) !important; }

/* ==========================================================================
   Inline picker wrap (trong form tạo card)
   ========================================================================== */
.gcc-mpicker-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.gcc-mpicker-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 8px;
  border: 2px dashed #a5b4fc;
  background: #f5f3ff;
  color: #4338ca;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all .15s;
}
.gcc-mpicker-trigger:hover { border-style: solid; background: #ede9fe; }

@media (prefers-color-scheme: dark) {
  .gcc-mpicker-trigger { background: #1e1b4b; border-color: #6366f1; color: #a5b4fc; }
  .gcc-mpicker-trigger:hover { background: #312e81; }
}

.gcc-mpicker-preview {
  position: relative;
  border: none;
  border-radius: 0;
  padding: 0;
  min-height: 0;
  background: none;
}
.gcc-mpicker-preview:empty { display: none; }

.gcc-mpicker-empty { display: none; }

.gcc-mpicker-thumb-img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 6px;
  display: block;
}

.gcc-mpicker-audio-preview,
.gcc-mpicker-video-preview,
.gcc-mpicker-model-preview {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.gcc-mpicker-icon { font-size: 1.4rem; }
.gcc-mpicker-name { font-size: 13px; font-weight: 500; }
.gcc-mpicker-hint { font-size: 11px; color: #888; }
.gcc-mpicker-audio-mini { max-width: 240px; height: 28px; }

.gcc-mp-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  background: rgba(0,0,0,.55);
  border: none;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  font-size: 11px;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.gcc-mp-remove:hover { background: #dc2626; }

/* ==========================================================================
   Multi-select list (images / videos / models)
   ========================================================================== */
.gcc-multi-image-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.gcc-multi-img-item {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: 10px;
  overflow: visible;
  flex-shrink: 0;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
}

/* Image thumbnail */
.gcc-multi-img-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
  display: block;
}

/* Video / model icon block */
.gcc-multi-media-icon {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  border-radius: 10px;
  gap: 2px;
  padding: 4px;
  box-sizing: border-box;
}

/* Overlay emoji badge khi multi-item có thumbnail thật */
.gcc-multi-media-overlay {
  position: absolute;
  top: 4px;
  left: 4px;
  font-size: 12px;
  line-height: 1;
  background: rgba(0,0,0,.5);
  border-radius: 4px;
  padding: 2px 4px;
  pointer-events: none;
}

.gcc-multi-media-name {
  font-size: 9px;
  color: #374151;
  text-align: center;
  word-break: break-all;
  max-width: 64px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.2;
}

/* Remove button — nhỏ, tròn, góc trên phải — !important để override Flatsome */
.gcc-multi-img-remove {
  position: absolute !important;
  top: -6px !important;
  right: -6px !important;
  width: 18px !important;
  height: 18px !important;
  min-height: 18px !important;
  min-width: 18px !important;
  max-width: 18px !important;
  border-radius: 50% !important;
  background: #ef4444 !important;
  background-color: #ef4444 !important;
  border: 2px solid #fff !important;
  color: #fff !important;
  font-size: 9px !important;
  line-height: 1 !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  z-index: 10 !important;
  padding: 0 !important;
  margin: 0 !important;
  box-shadow: 0 1px 4px rgba(0,0,0,.2) !important;
  transition: background .15s, transform .1s;
  text-transform: none !important;
  letter-spacing: 0 !important;
  font-weight: normal !important;
  box-sizing: border-box !important;
}
.gcc-multi-img-remove:hover {
  background: #dc2626 !important;
  background-color: #dc2626 !important;
  transform: scale(1.15);
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
  .gcc-multi-img-item {
    background: #2a2a2a;
    border-color: #444;
  }
  .gcc-multi-media-name { color: #e5e5e5; }
  .gcc-multi-img-remove { border-color: #1e1e1e; }
}

/* Mobile — nhỏ hơn tí trên điện thoại */
@media (max-width: 480px) {
  .gcc-multi-img-item {
    width: 60px;
    height: 60px;
  }
  .gcc-multi-media-icon { font-size: 1.3rem; }
  .gcc-multi-img-remove {
    width: 16px !important;
    height: 16px !important;
    min-height: 16px !important;
    min-width: 16px !important;
    font-size: 8px !important;
    top: -5px !important;
    right: -5px !important;
  }
}

/* ==========================================================================
   GCC External Media Admin Page
   ========================================================================== */
.gcc-ext-wrap {
  max-width: 1100px;
  margin-top: 20px;
}

.gcc-ext-wrap h1 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 4px;
  color: #1a1a2e;
}

.gcc-ext-wrap .gcc-ext-desc {
  color: #6b7280;
  font-size: 13px;
  margin-bottom: 20px;
}

/* ── Layout grid ── */
.gcc-ext-grid {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 24px;
  align-items: start;
}

/* ── Form card ── */
.gcc-ext-form-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 24px;
}

.gcc-ext-form-card h2 {
  font-size: 15px;
  font-weight: 600;
  color: #111827;
  margin: 0 0 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f3f4f6;
}

/* ── Form fields ── */
.gcc-ext-field {
  margin-bottom: 16px;
}

.gcc-ext-field label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: #374151;
  margin-bottom: 5px;
}

.gcc-ext-field input[type="text"],
.gcc-ext-field input[type="url"],
.gcc-ext-field select {
  width: 100% !important;
  border: 1px solid #d1d5db !important;
  border-radius: 8px !important;
  padding: 8px 12px !important;
  font-size: 13px !important;
  color: #111827 !important;
  background: #fff !important;
  height: auto !important;
  min-height: auto !important;
  line-height: 1.5 !important;
  box-sizing: border-box !important;
  transition: border-color .15s !important;
}

.gcc-ext-field input[type="text"]:focus,
.gcc-ext-field input[type="url"]:focus,
.gcc-ext-field select:focus {
  border-color: #6366f1 !important;
  outline: none !important;
  box-shadow: 0 0 0 3px rgba(99,102,241,.1) !important;
}

.gcc-ext-field .gcc-ext-hint {
  font-size: 11px;
  color: #9ca3af;
  margin-top: 4px;
  display: block;
}

/* ── Submit button ── */
.gcc-ext-submit {
  background: #6366f1 !important;
  color: #fff !important;
  border: none !important;
  border-radius: 8px !important;
  padding: 9px 20px !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  cursor: pointer;
  width: 100% !important;
  margin-top: 4px !important;
  height: auto !important;
  min-height: auto !important;
  line-height: 1.5 !important;
  letter-spacing: 0 !important;
  transition: background .15s !important;
}
.gcc-ext-submit:hover {
  background: #4f46e5 !important;
}

/* ── List card ── */
.gcc-ext-list-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 24px;
}

.gcc-ext-list-card h2 {
  font-size: 15px;
  font-weight: 600;
  color: #111827;
  margin: 0 0 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f3f4f6;
}

.gcc-ext-empty {
  color: #9ca3af;
  font-size: 13px;
  text-align: center;
  padding: 32px 0;
}

/* ── Table ── */
.gcc-ext-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.gcc-ext-table th {
  text-align: left;
  font-weight: 500;
  color: #6b7280;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 8px 12px;
  border-bottom: 1px solid #f3f4f6;
}

.gcc-ext-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #f9fafb;
  color: #111827;
  vertical-align: middle;
}

.gcc-ext-table tr:last-child td {
  border-bottom: none;
}

.gcc-ext-table tr:hover td {
  background: #fafafa;
}

.gcc-ext-icon {
  font-size: 16px;
  text-align: center;
}

.gcc-ext-url {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  color: #6366f1;
}

.gcc-ext-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 500;
  background: #f3f4f6;
  color: #374151;
}

.gcc-ext-edit-btn {
  background: #f3f4f6 !important;
  border: 1px solid #e5e7eb !important;
  border-radius: 6px !important;
  padding: 4px 10px !important;
  font-size: 12px !important;
  color: #374151 !important;
  cursor: pointer;
  text-decoration: none !important;
  height: auto !important;
  min-height: auto !important;
  line-height: 1.5 !important;
}
.gcc-ext-edit-btn:hover {
  background: #e5e7eb !important;
  color: #111827 !important;
}

/* ── Notice ── */
.gcc-ext-notice {
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 16px;
}
.gcc-ext-notice.success {
  background: #f0fdf4;
  border: 1px solid #86efac;
  color: #166534;
}
.gcc-ext-notice.error {
  background: #fef2f2;
  border: 1px solid #fca5a5;
  color: #991b1b;
}

@media (max-width: 900px) {
  .gcc-ext-grid { grid-template-columns: 1fr; }
}
/* ─────────────────────────────────────────────────────────────────
 * Multi-select UI (v2.1)
 * ───────────────────────────────────────────────────────────────── */

/* Checkmark badge ở góc card khi được chọn */
.gcc-mp-card.selected::after {
  content: '✓';
  position: absolute !important;
  inset: auto !important; /* huỷ override `inset:0` từ `.gcc-mp-card > *` — đặt trước top/right */
  top: 6px !important;
  right: 6px !important;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--mp-accent);
  color: #fff;
  font-size: 14px;
  font-weight: bold;
  line-height: 24px;
  text-align: center;
  z-index: 5;
  box-shadow: 0 2px 6px rgba(0,0,0,.2);
  animation: gcc-mp-check-in .2s ease-out;
}
@keyframes gcc-mp-check-in {
  from { transform: scale(0); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

/* Selected stronger để dễ nhìn ở multi-mode */
.gcc-mp-card.selected {
  border-width: 3px !important;
  background: rgba(99,102,241,.08);
}

/* Clear button */
.gcc-mp-clear-btn {
  margin-right: 8px;
}

/* Toast notifications trong picker */
.gcc-mp-toast-host {
  position: absolute;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}
.gcc-mp-toast {
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: #fff;
  background: rgba(30,30,30,.95);
  box-shadow: 0 4px 16px rgba(0,0,0,.25);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .25s, transform .25s;
  max-width: 320px;
  text-align: center;
  pointer-events: auto;
}
.gcc-mp-toast--show {
  opacity: 1;
  transform: translateY(0);
}
.gcc-mp-toast--warn {
  background: rgba(180, 83, 9, .96); /* amber-700 */
}
.gcc-mp-toast--info {
  background: rgba(30,30,30,.95);
}

/* Mobile: toast ngắn hơn để khớp khung hẹp */
@media (max-width: 480px) {
  .gcc-mp-toast-host { bottom: 70px; }
  .gcc-mp-toast { font-size: 12px; padding: 8px 12px; max-width: 90vw; }
  .gcc-mp-card.selected::after {
    width: 20px;
    height: 20px;
    line-height: 20px;
    font-size: 12px;
    top: 4px !important;
    right: 4px !important;
  }
}