/* ===== CONTAINER ===== */

.discussions__bottom__hello {
  display: flex !important;
  flex-direction: column !important;
  width: 100% !important;
  padding: 6px 10px !important;
  box-sizing: border-box !important;
  overflow: visible !important;
  position: relative !important;
  gap: 4px !important;
}

/* Hide native MYM buttons when our toolbar is present */
.discussions__bottom__hello > #button-creator-offer-private-media,
.discussions__bottom__hello > #button-creator-reply-the-offer {
  display: none !important;
}

/* ===== CHARACTER COUNTER ===== */

.mym-char-counter {
  align-self: flex-end;
  font-size: 11px;
  font-weight: 500;
  color: rgba(255,255,255,0.4);
  padding: 0 4px 2px 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, monospace;
  user-select: none;
  transition: color 0.2s;
}

.mym-char-counter:hover {
  color: rgba(255,255,255,0.6);
}

.mym-char-counter--over {
  color: #ef4444 !important;
  font-weight: 600;
}

.mym-char-counter--over:hover {
  color: #dc2626 !important;
}

/* ===== UNIFIED TOOLBAR ===== */

#mym-ai-toolbar {
  display: flex;
  align-items: stretch;
  width: 100%;
  height: 38px;
  background: #1e1e2e;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  overflow-x: clip;
  overflow-y: visible;
  position: relative;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ===== TAB (generic) ===== */

.mym-tb-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  cursor: pointer;
  color: rgba(255,255,255,0.55);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
  position: relative;
  border-left: 1px solid rgba(255,255,255,0.08);
  user-select: none;
  flex-shrink: 0;
  min-width: 0;
}

.mym-tb-tab:first-child {
  border-left: none;
  border-radius: 12px 0 0 12px;
}

.mym-tb-tab:hover {
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.9);
}

.mym-tb-tab svg {
  flex-shrink: 0;
}

.mym-tb-spacer {
  flex: 1 1 0;
  min-width: 2px;
}

.mym-tb-inner-sep {
  width: 1px;
  height: 18px;
  background: rgba(255,255,255,0.12);
  flex-shrink: 0;
}

.mym-tb-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #34d399;
  flex-shrink: 0;
}

.mym-tb-badge {
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  background: #818cf8;
  padding: 1px 5px;
  border-radius: 8px;
  line-height: 1.3;
}

/* ===== TOOLTIPS ===== */

#mym-ai-toolbar button[data-tooltip],
#mym-ai-script-pill [data-tooltip] {
  position: relative;
}

#mym-ai-toolbar button[data-tooltip]::after,
#mym-ai-script-pill [data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute !important;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: #0f0f1a;
  color: rgba(255,255,255,0.9);
  font-size: 11px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 6px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
  z-index: 100000;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  border: 1px solid rgba(255,255,255,0.08);
}

#mym-ai-toolbar button[data-tooltip]:hover::after,
#mym-ai-script-pill [data-tooltip]:hover::after {
  opacity: 1;
  transition-delay: 1s;
}

/* ===== AI TAB ===== */

#mym-tb-ai {
  gap: 0;
  padding: 0;
}

#mym-ai-generate-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 12px;
  height: 100%;
  border: none;
  background: transparent;
  color: rgba(255,255,255,0.55);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
  line-height: 1;
}

#mym-ai-generate-btn:hover {
  background: rgba(255,255,255,0.06);
  color: #fff;
}

#mym-ai-model-chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 100%;
  border: none;
  background: transparent;
  color: rgba(255,255,255,0.4);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  padding: 0;
  border-radius: 12px 0 0 12px;
}

#mym-ai-model-chevron:hover {
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.9);
}

/* ===== COLLAPSE CHEVRON ===== */

#mym-ai-collapse-btn {
  position: fixed;
  right: 0;
  top: 60%;
  transform: translateY(-50%);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 36px;
  border: none;
  border-radius: 8px 0 0 8px;
  background: rgba(59,130,246,0.7);
  color: rgba(255,255,255,0.8);
  cursor: pointer;
  transition: background 0.2s, width 0.2s;
  padding: 0;
  backdrop-filter: blur(4px);
}

#mym-ai-collapse-btn:hover {
  background: rgba(59,130,246,0.95);
  color: #fff;
  width: 32px;
}

#mym-ai-start-script-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 0 14px;
  height: 26px;
  margin: 0 2px;
  border: none;
  border-radius: 6px;
  background: #818cf8;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  transition: background 0.15s, opacity 0.15s;
  line-height: 1;
}

#mym-ai-start-script-btn:hover {
  background: #6366f1;
}

#mym-ai-generate-btn:active,
#mym-ai-start-script-btn:active {
  opacity: 0.85;
}

#mym-ai-generate-btn.mym-ai-loading {
  opacity: 0.5;
  cursor: wait;
}

/* ===== MODEL SWITCHER DROPDOWN ===== */

#mym-ai-model-dropdown {
  position: fixed;
  min-width: 260px;
  max-height: 360px;
  overflow-y: auto;
  background: #1e1e2e;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 14px;
  padding: 6px 0;
  box-shadow: 0 12px 40px rgba(0,0,0,0.5);
  z-index: 10000;
  animation: mym-dropdown-in 0.15s ease-out;
}

@keyframes mym-dropdown-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.mym-model-provider-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px 4px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  user-select: none;
}

.mym-model-no-key {
  font-size: 9px;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  color: #f59e0b;
  background: rgba(245,158,11,0.1);
  padding: 1px 6px;
  border-radius: 4px;
}

.mym-ai-media-preview-uploading {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(15, 17, 28, 0.72);
  color: rgba(255, 255, 255, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: mym-cloud-spinner-rot 1s linear infinite;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.mym-ai-media-preview-uploading svg {
  width: 14px;
  height: 14px;
}

.mym-model-item {
  padding: 8px 14px;
  font-size: 13px;
  color: #e2e8f0;
  cursor: pointer;
  transition: background 0.1s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mym-model-item:hover {
  background: rgba(255,255,255,0.06);
}

.mym-model-item.mym-model-active {
  color: #818cf8;
  font-weight: 600;
  background: rgba(129,140,248,0.1);
}

.mym-model-item.mym-model-active::before {
  content: '✓ ';
}

.mym-model-item.mym-model-disabled {
  color: #475569;
  cursor: not-allowed;
}

.mym-model-item.mym-model-disabled:hover {
  background: transparent;
}

/* ===== NOTE TAB ===== */

#mym-tb-note {
  position: relative;
  z-index: 10002;
}

#mym-ai-note-panel {
  position: fixed;
  width: 300px;
  background: #1e1e2e;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  z-index: 999999;
  animation: mym-note-panel-in 0.15s ease-out;
  font-family: inherit;
  overflow: hidden;
  max-height: 80vh;
  overflow-y: auto;
}

@keyframes mym-note-panel-in {
  from { opacity: 0; transform: translateY(6px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.mym-note-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mym-note-panel-title {
  font-size: 12px;
  font-weight: 700;
  color: #fff;
}

.mym-note-panel-close {
  background: rgba(255, 255, 255, 0.12);
  border: none;
  color: rgba(255, 255, 255, 0.7);
  width: 22px;
  height: 22px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.mym-note-panel-close:hover {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
}

.mym-note-textarea {
  width: 100%;
  min-height: 100px;
  max-height: 200px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.06);
  border: none;
  color: #fff;
  font-size: 13px;
  font-family: inherit;
  line-height: 1.5;
  resize: vertical;
  outline: none;
}

.mym-note-textarea::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.mym-note-panel-footer {
  padding: 6px 14px;
  min-height: 26px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.mym-note-status {
  font-size: 11px;
  color: #bbf7d0;
  font-weight: 500;
}

.mym-note-ext-zone {
  padding: 8px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.06);
  text-align: center;
}

.mym-note-ext-label {
  font-size: 10px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 4px;
}

.mym-note-ext-content {
  font-size: 13px;
  color: #fff;
  line-height: 1.5;
  max-height: 80px;
  overflow-y: auto;
}

.mym-note-import-btn {
  display: inline-block;
  margin-top: 6px;
  padding: 5px 14px;
  border: none;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}

.mym-note-import-btn:hover {
  background: rgba(255, 255, 255, 0.25);
}

.mym-note-import-btn:disabled {
  opacity: 0.6;
  cursor: default;
}

/* ===== FAN STATS ZONE (inside note panel) ===== */

.mym-note-stats-zone {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  max-height: 320px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.3) transparent;
}

.mym-note-stats-zone::-webkit-scrollbar {
  width: 4px;
}

.mym-note-stats-zone::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 2px;
}

.mym-stats-header {
  font-size: 11px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.7);
  padding: 8px 14px 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
}
.mym-stats-header:hover { color: rgba(255, 255, 255, 0.9); }

.mym-stats-chevron {
  transition: transform 0.25s ease;
  transform: rotate(-90deg);
  flex-shrink: 0;
}
.mym-stats-chevron.open {
  transform: rotate(0deg);
}

.mym-stats-refresh-spinner {
  width: 12px;
  height: 12px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  animation: mym-stats-refresh-spin 0.8s linear infinite;
}

@keyframes mym-stats-refresh-spin {
  to { transform: rotate(360deg); }
}

.mym-stats-body {
  overflow: hidden;
  max-height: 600px;
  transition: max-height 0.3s ease, opacity 0.25s ease;
  opacity: 1;
}
.mym-stats-body.collapsed {
  max-height: 0;
  opacity: 0;
}

.mym-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 6px 14px;
}

.mym-stats-item {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 8px 10px;
  text-align: center;
}

.mym-stats-value {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
}

.mym-stats-label {
  font-size: 9px;
  color: rgba(255, 255, 255, 0.55);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-top: 2px;
}

.mym-stats-section {
  padding: 6px 14px;
}

.mym-stats-section-title {
  font-size: 10px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.55);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: 4px;
}

.mym-stats-breakdown-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 3px 0;
  font-size: 11px;
}

.mym-stats-breakdown-type {
  color: rgba(255, 255, 255, 0.8);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 55%;
}

.mym-stats-breakdown-val {
  color: rgba(255, 255, 255, 0.6);
  font-weight: 600;
  font-size: 10px;
  white-space: nowrap;
}

.mym-stats-recent-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 0;
  font-size: 11px;
}

.mym-stats-recent-date {
  color: rgba(255, 255, 255, 0.5);
  font-size: 10px;
  min-width: 42px;
  flex-shrink: 0;
}

.mym-stats-recent-type {
  color: rgba(255, 255, 255, 0.75);
  font-weight: 500;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mym-stats-recent-amount {
  color: #fff;
  font-weight: 600;
  font-size: 10px;
  white-space: nowrap;
  flex-shrink: 0;
}

.mym-stats-footer {
  padding: 6px 14px 8px;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.45);
  font-weight: 500;
  text-align: center;
  line-height: 1.4;
}

.mym-stats-empty {
  padding: 14px;
  text-align: center;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.45);
}

.mym-stats-loading {
  padding: 14px;
  text-align: center;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.mym-stats-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-top-color: #fff;
  border-radius: 50%;
  animation: mym-stats-spin 0.6s linear infinite;
}

@keyframes mym-stats-spin {
  to { transform: rotate(360deg); }
}

/* ===== SCRIPT TAB ===== */

#mym-tb-script {
  padding: 0;
  border-left: 1px solid rgba(255,255,255,0.08);
  cursor: default;
  position: relative;
}

#mym-tb-script:hover {
  background: transparent;
}

#mym-ai-script-pill {
  display: inline-flex;
  align-items: stretch;
  height: 100%;
  background: none;
  border: none;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  white-space: nowrap;
  position: relative;
}

/* Language picker button (left part of split pill) */
.mym-pill-lang-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 100%;
  border: none;
  border-radius: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
  padding: 0;
  font-size: 14px;
  line-height: 1;
  flex-shrink: 0;
  transition: background 0.15s;
}

.mym-pill-lang-btn:hover {
  background: rgba(255,255,255,0.08);
}

.mym-pill-lang-flag {
  font-size: 14px;
  line-height: 1;
}

/* Main label button (center part of split pill) */
.mym-pill-main {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  border: none;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0;
  background: transparent;
  color: rgba(255,255,255,0.7);
  cursor: pointer;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
  line-height: 1;
}

/* When pill-main is the first element (no lang button) → round left */
.mym-pill-main-first {
  border-radius: 15px 0 0 15px;
  border-left: none;
}

/* When pill-main is the last element (no pause button) → round right */
.mym-pill-main-last {
  border-radius: 0 15px 15px 0;
}

/* When pill-main is both first and last (standalone) → round all */
.mym-pill-main-first.mym-pill-main-last {
  border-radius: 15px;
}

.mym-pill-main:hover {
  background: rgba(255,255,255,0.06);
  color: #fff;
}

/* Pause button (right part of split pill) */
.mym-pill-pause-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 100%;
  border: none;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0 12px 12px 0;
  background: transparent;
  color: rgba(255,255,255,0.5);
  cursor: pointer;
  padding: 0;
  font-size: 12px;
  line-height: 1;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
}

.mym-pill-pause-btn:hover {
  background: rgba(255,255,255,0.08);
  color: #fff;
}

.mym-pill-pause-icon {
  font-size: 12px;
  line-height: 1;
}

.mym-lang-dropdown {
  position: absolute;
  bottom: calc(100% + 6px);
  right: 0;
  min-width: 170px;
  background: #1e1e2e;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  padding: 6px;
  display: none;
  flex-direction: column;
  gap: 2px;
  z-index: 10003;
}

.mym-lang-dropdown.open {
  display: flex;
}

.mym-lang-dropdown-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mym-lang-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: rgba(255, 255, 255, 0.85);
  font-size: 12.5px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
  text-align: left;
}

.mym-lang-dropdown-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

.mym-lang-dropdown-item.active {
  background: rgba(129, 140, 248, 0.15);
  color: #818cf8;
  font-weight: 700;
}

.mym-lang-dropdown-flag {
  font-size: 15px;
  line-height: 1;
}

.mym-lang-dropdown-name {
  flex: 1;
}

.mym-pill-name {
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Script dropdown */

.mym-script-dropdown {
  position: absolute;
  bottom: calc(100% + 4px);
  right: 0;
  min-width: 220px;
  background: #1e1e2e;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  padding: 5px;
  display: none;
  flex-direction: column;
  gap: 2px;
  z-index: 10003;
}

.mym-script-dropdown.open {
  display: flex;
}

.mym-script-dropdown-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: rgba(255, 255, 255, 0.75);
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s;
  text-align: left;
  white-space: nowrap;
}

.mym-script-dropdown-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.mym-script-dropdown-item.active {
  background: rgba(129, 140, 248, 0.15);
  color: #818cf8;
  font-weight: 700;
}

.mym-script-dropdown-name {
  overflow: hidden;
  text-overflow: ellipsis;
}

.mym-script-dropdown-count {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
  flex-shrink: 0;
}

.mym-script-dropdown-search-wrap {
  padding: 4px 4px 2px;
}

.mym-script-dropdown-search {
  width: 100%;
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: 12px;
  font-family: inherit;
  outline: none;
  box-sizing: border-box;
}

.mym-script-dropdown-search::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.mym-script-dropdown-search:focus {
  border-color: rgba(129, 140, 248, 0.4);
  background: rgba(255, 255, 255, 0.08);
}

.mym-script-dropdown-list {
  max-height: 200px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mym-script-dropdown-list::-webkit-scrollbar {
  width: 4px;
}

.mym-script-dropdown-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 2px;
}

/* ===== VARIANT TAB ===== */

#mym-tb-variant {
  padding: 0;
  border-left: 1px solid rgba(255,255,255,0.08);
  cursor: default;
}

#mym-tb-variant:hover {
  background: transparent;
}

/* ===== VARIANT NAV BAR ===== */

#mym-ai-variant-bar {
  --vbar-base: rgba(255,255,255,0.04);
  --vbar-hover: rgba(255,255,255,0.1);
  --vbar-sent: rgba(34, 197, 94, 0.15);
  --vbar-sent-hover: rgba(34, 197, 94, 0.25);
  display: inline-flex;
  align-items: stretch;
  height: 100%;
  border: none;
  background: none;
  white-space: nowrap;
  font-family: inherit;
  gap: 0;
}

.mym-vbar-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 100%;
  border: none;
  background: var(--vbar-base);
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  padding: 0;
  transition: background 0.15s, color 0.15s;
}

.mym-vbar-btn:hover {
  background: var(--vbar-hover);
  color: #fff;
}

.mym-vbar-btn--left {
  border-radius: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.mym-vbar-btn--mid-left {
  border-radius: 0;
}

.mym-vbar-btn--mid-right {
  border-radius: 0;
}

.mym-vbar-btn--right {
  border-radius: 0;
  border-left: 1px solid rgba(255, 255, 255, 0.06);
}

.mym-vbar-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.65);
  padding: 0 8px;
  user-select: none;
  font-weight: 500;
  background: transparent;
  border-left: 1px solid rgba(255, 255, 255, 0.06);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.mym-vbar-label strong {
  color: rgba(255,255,255,0.9);
  font-weight: 700;
}

/* ===== SENT INDICATOR (green tint) ===== */

#mym-ai-variant-bar.mym-variant-sent .mym-vbar-btn {
  background: var(--vbar-sent);
  color: rgba(34, 197, 94, 0.8);
}

#mym-ai-variant-bar.mym-variant-sent .mym-vbar-btn:hover {
  background: var(--vbar-sent-hover);
  color: #34d399;
}

#mym-ai-variant-bar.mym-variant-sent .mym-vbar-label {
  background: var(--vbar-sent);
  color: rgba(34, 197, 94, 0.8);
}

#mym-ai-variant-bar.mym-variant-sent .mym-vbar-label strong {
  color: #34d399;
}

.mym-sent-check {
  color: #34d399;
  font-weight: 700;
  margin-right: 3px;
  font-size: 10px;
}

/* ===== PAUSE INDICATOR ===== */

#mym-ai-script-pill.mym-pill-paused .mym-pill-lang-btn,
#mym-ai-script-pill.mym-pill-paused .mym-pill-main,
#mym-ai-script-pill.mym-pill-paused .mym-pill-pause-btn {
  background: rgba(239, 68, 68, 0.15);
  color: rgba(239, 68, 68, 0.8);
}

#mym-ai-script-pill.mym-pill-paused .mym-pill-lang-btn:hover,
#mym-ai-script-pill.mym-pill-paused .mym-pill-main:hover,
#mym-ai-script-pill.mym-pill-paused .mym-pill-pause-btn:hover {
  background: rgba(239, 68, 68, 0.25);
  color: #ef4444;
}

.mym-script-dropdown-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.15);
  margin: 4px 0;
}

.mym-pause-btn .mym-script-dropdown-name {
  font-size: 11px;
  opacity: 0.9;
}

/* ===== PRICE TAB ===== */

#mym-tb-price {
  gap: 6px;
  padding: 0 10px;
  border-left: 1px solid rgba(255,255,255,0.08);
  cursor: default;
}

#mym-tb-price:hover {
  background: transparent;
}

.mym-media-preview-btn {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: rgba(255, 255, 255, 0.06);
  border: none;
  color: rgba(255, 255, 255, 0.7);
  font-size: 11px;
  cursor: pointer;
  padding: 3px 6px;
  border-radius: 6px;
  transition: all 0.15s;
  font-family: inherit;
}

.mym-media-preview-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.mym-media-count-badge {
  background: #818cf8;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 4px;
}

.mym-media-price-input {
  width: 30px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 5px;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  padding: 2px 2px;
  font-family: inherit;
  -moz-appearance: textfield;
  appearance: textfield;
}

.mym-media-price-input::-webkit-outer-spin-button,
.mym-media-price-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.mym-media-price-input:focus {
  outline: none;
  border-color: rgba(129, 140, 248, 0.5);
}

.mym-media-price-unit {
  color: rgba(255, 255, 255, 0.3);
  font-size: 11px;
  font-weight: 600;
}

/* ===== TRANSLATE INPUT BUTTON ===== */

.mym-translate-input-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 36px !important;
  height: 36px !important;
  border-radius: 50% !important;
  border: none !important;
  background: #fff !important;
  color: #1a1a2e !important;
  cursor: pointer !important;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s, opacity 0.15s;
  box-shadow: 0 1px 4px rgba(0,0,0,0.18);
  padding: 0 !important;
  pointer-events: auto !important;
  z-index: 999999 !important;
}

.mym-translate-input-btn:hover {
  background: #f0f0ff;
  color: #6366f1;
}

.mym-translate-input-btn--loading {
  opacity: 0.55;
}

.mym-translate-input-btn--active {
  background: #d1fae5 !important;
  color: #059669 !important;
}

.mym-translate-input-btn--error {
  background: #fee2e2 !important;
  color: #dc2626 !important;
}

/* ===== TRANSLATE LANGUAGE DROPDOWN ===== */

.mym-translate-lang-dropdown {
  background: #1e1e2e;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 4px;
  min-width: 160px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  z-index: 999999;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.mym-translate-lang-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 7px;
  font-size: 13px;
  color: rgba(255,255,255,0.82);
  cursor: pointer;
  transition: background 0.12s;
  user-select: none;
}

.mym-translate-lang-item:hover {
  background: rgba(255,255,255,0.08);
  color: #fff;
}

.mym-translate-lang-item.active {
  background: rgba(99,102,241,0.18);
  color: #818cf8;
}

.mym-translate-lang-undo {
  color: #34d399;
  font-weight: 500;
}

.mym-translate-lang-undo:hover {
  background: rgba(52,211,153,0.1);
}

.mym-translate-lang-sep {
  height: 1px;
  background: rgba(255,255,255,0.07);
  margin: 3px 4px;
}

.mym-translate-lang-flag {
  font-size: 15px;
  line-height: 1;
}

/* ===== CLOUD TAB ===== */

#mym-tb-cloud {
  gap: 4px;
}

.mym-tb-clear {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 100, 100, 0.15);
  color: rgba(255, 100, 100, 0.8);
  cursor: pointer;
  padding: 0;
  transition: all 0.15s;
  flex-shrink: 0;
}

.mym-tb-clear:hover {
  background: rgba(255, 100, 100, 0.3);
  color: #ff6b6b;
}

.mym-cloud-upload-spinner {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  color: rgba(255, 255, 255, 0.78);
  animation: mym-cloud-spinner-rot 1s linear infinite;
}

.mym-cloud-upload-spinner svg {
  width: 16px;
  height: 16px;
}

@keyframes mym-cloud-spinner-rot {
  to { transform: rotate(360deg); }
}

/* ===== CLOUD CHOICE MODAL ===== */

#mym-cloud-choice-overlay {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: mym-cloud-overlay-in 0.2s ease-out;
}

.mym-cloud-choice-modal {
  width: min(92vw, 360px);
  background: #1e1e2e;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  animation: mym-cloud-modal-in 0.2s ease-out;
}

.mym-cloud-choice-title {
  font-size: 15px;
  font-weight: 700;
  color: #f8fafc;
}

.mym-cloud-choice-subtitle {
  font-size: 12px;
  color: rgba(255,255,255,0.55);
}

.mym-cloud-choice-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 4px;
}

.mym-cloud-choice-btn {
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 10px;
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.9);
  font-size: 13px;
  font-weight: 600;
  padding: 10px 12px;
  cursor: pointer;
  transition: all 0.15s;
}

.mym-cloud-choice-btn:hover {
  border-color: rgba(129, 140, 248, 0.45);
  background: rgba(129, 140, 248, 0.14);
}

.mym-cloud-choice-btn-import:hover {
  border-color: rgba(56, 189, 248, 0.45);
  background: rgba(56, 189, 248, 0.14);
}

.mym-cloud-choice-cancel {
  border: none;
  background: transparent;
  color: rgba(255,255,255,0.55);
  font-size: 12px;
  font-weight: 600;
  padding: 6px;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.15s;
}

.mym-cloud-choice-cancel:hover {
  color: rgba(255,255,255,0.85);
  background: rgba(255,255,255,0.06);
}

/* ===== CLOUD MODAL ===== */

#mym-cloud-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 999998;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: mym-cloud-overlay-in 0.2s ease-out;
}

@keyframes mym-cloud-overlay-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.mym-cloud-modal {
  width: 90vw;
  max-width: 480px;
  height: 85vh;
  background: #1e1e2e;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  animation: mym-cloud-modal-in 0.25s ease-out;
}

@keyframes mym-cloud-modal-in {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.mym-cloud-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: rgba(255,255,255,0.04);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
}

.mym-cloud-modal-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,0.85);
}

.mym-cloud-modal-title svg {
  color: #818cf8;
}

.mym-cloud-modal-close {
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 8px;
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.6);
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.mym-cloud-modal-close:hover {
  background: rgba(255, 100, 100, 0.2);
  color: #ff6b6b;
}

#mym-cloud-modal-iframe {
  flex: 1;
  width: 100%;
  border: none;
  background: #fff;
}

/* ===== SPINNER ===== */

.mym-ai-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-top-color: #fff;
  border-radius: 50%;
  animation: mym-ai-spin 0.8s linear infinite;
}

@keyframes mym-ai-spin {
  to { transform: rotate(360deg); }
}

/* ===== NOTIFICATIONS ===== */

.mym-ai-notification {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 10001;
  background: rgba(15, 15, 25, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
  border-radius: 12px;
  padding: 14px 18px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  opacity: 0;
  transform: translateX(400px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  max-width: 340px;
}

.mym-ai-notification--show {
  opacity: 1;
  transform: translateX(0);
}

.mym-ai-notification--success { border-left: 3px solid #48bb78; }
.mym-ai-notification--error { border-left: 3px solid #fc8181; }
.mym-ai-notification--info { border-left: 3px solid #818cf8; }

/* ===== MEDIA PREVIEW PANEL ===== */

.mym-ai-media-preview {
  width: 100%;
  background: rgba(20, 20, 35, 0.98);
  border: 1px solid rgba(255,255,255,0.08);
  border-bottom: none;
  border-radius: 12px 12px 0 0;
  overflow: hidden;
  font-family: inherit;
  animation: mym-preview-in 0.18s ease-out;
}

@keyframes mym-preview-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.mym-ai-media-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255,255,255,0.07);
  color: rgba(255, 255, 255, 0.6);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.mym-ai-media-preview-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.mym-ai-media-preview-cloud {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(129, 140, 248, 0.12);
  border: none;
  color: #818cf8;
  cursor: pointer;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 5px;
  transition: all 0.15s;
  font-family: inherit;
}

.mym-ai-media-preview-cloud:hover {
  background: rgba(129, 140, 248, 0.25);
  color: #a5b4fc;
}

.mym-ai-media-preview-grid {
  display: flex;
  flex-direction: row;
  gap: 4px;
  padding: 6px 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.mym-ai-media-preview-grid::-webkit-scrollbar {
  display: none;
}

.mym-ai-media-preview-item {
  position: relative;
  border-radius: 7px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.25);
  flex: 0 0 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.15s;
}

.mym-ai-media-preview-item:hover {
  opacity: 1;
}

.mym-ai-media-remove-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 9px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  padding: 0;
  transition: background 0.15s, transform 0.1s;
}

.mym-ai-media-remove-btn:hover {
  background: rgba(239, 68, 68, 0.85);
  transform: scale(1.15);
}

.mym-ai-media-preview-img {
  display: block;
  width: 72px;
  height: 72px;
  object-fit: cover;
}

.mym-ai-media-preview-badge {
  position: absolute;
  bottom: 3px;
  left: 3px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 9px;
  font-weight: 600;
  padding: 1px 5px;
  border-radius: 3px;
}

.mym-ai-media-preview-loading,
.mym-ai-media-preview-error {
  padding: 10px;
  text-align: center;
  color: rgba(255, 255, 255, 0.5);
  font-size: 11px;
}

/* ===== LIGHTBOX ===== */

#mym-ai-lightbox {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: mym-lightbox-in 0.2s ease-out;
}

@keyframes mym-lightbox-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.mym-ai-lightbox-media {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: 12px;
  object-fit: contain;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

.mym-ai-lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.mym-ai-lightbox-close:hover {
  background: rgba(255, 100, 100, 0.4);
}

.mym-ai-lightbox-loading {
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  font-family: inherit;
}

#mym-ai-lightbox video.mym-ai-lightbox-media {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: 12px;
  background: #000;
}

/* ===== PILL CHEVRON ===== */

.mym-pill-chevron {
  transition: transform 0.2s ease;
  flex-shrink: 0;
  color: rgba(255,255,255,0.4);
}

.mym-pill-chevron.mym-chevron-open {
  transform: rotate(180deg);
}

/* ===== RESPONSIVE COMPACT DEFAULTS ===== */

.mym-start-short { display: none; }

/* ===== RESPONSIVE TOOLBAR (class-based, driven by ResizeObserver) ===== */

/* Level 1: hide "Réponse IA" text */
#mym-ai-toolbar.mym-compact-1 #mym-ai-generate-btn span { display: none; }
#mym-ai-toolbar.mym-compact-1 #mym-ai-generate-btn { padding: 0 10px; }

/* Level 2: hide script name (chevron only), shorten "Lancer le script" */
#mym-ai-toolbar.mym-compact-2 .mym-start-full { display: none; }
#mym-ai-toolbar.mym-compact-2 .mym-start-short { display: inline; }
#mym-ai-toolbar.mym-compact-2 .mym-pill-name { display: none; }

/* Level 3: hide lang picker, round left of pill-main */
#mym-ai-toolbar.mym-compact-3 .mym-pill-lang-btn { display: none; }
#mym-ai-toolbar.mym-compact-3 .mym-pill-main { border-left: none; border-radius: 8px 0 0 8px; }
#mym-ai-toolbar.mym-compact-3 .mym-pill-main-last { border-radius: 8px; }

/* ===== RESPONSIVE GENERAL ===== */

@media (max-width: 768px) {
  .mym-ai-notification {
    top: 10px;
    right: 10px;
    left: 10px;
    max-width: none;
  }
}

/* ===== FAN AI ANALYSIS ===== */

.mym-fan-ai-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: linear-gradient(135deg, #7b2ff7, #c0186c);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  line-height: 1;
  white-space: nowrap;
  transition: opacity 0.15s;
}
.mym-fan-ai-btn:hover { opacity: 0.85; }
.mym-fan-ai-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.mym-fan-ai-zone {
  border-top: 1px solid rgba(255,255,255,0.07);
  max-height: 340px;
  overflow-y: auto;
  background: rgba(0,0,0,0.2);
}

.mym-fan-ai-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 700;
  color: #c084fc;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  position: sticky;
  top: 0;
  background: #1a1030;
  z-index: 1;
}

.mym-fan-ai-loading {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 12px;
  font-size: 12px;
  color: rgba(255,255,255,0.5);
}

.mym-fan-ai-error {
  padding: 12px;
  font-size: 12px;
  color: #f87171;
}

.mym-fan-ai-result {
  padding: 6px 4px 8px;
}

.mym-ai-section {
  padding: 8px 12px;
  border-radius: 6px;
  margin: 2px 4px;
}

.mym-ai-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 700;
  color: #c084fc;
  margin-bottom: 5px;
  user-select: none;
}

.mym-ai-section-copy {
  background: none;
  border: none;
  color: rgba(255,255,255,0.35);
  cursor: pointer;
  padding: 2px 3px;
  line-height: 1;
  flex-shrink: 0;
  border-radius: 4px;
  transition: color 0.15s, background 0.15s;
}
.mym-ai-section-copy:hover {
  color: rgba(255,255,255,0.8);
  background: rgba(255,255,255,0.08);
}

.mym-ai-section-body {
  font-size: 12px;
  color: rgba(255,255,255,0.8);
  line-height: 1.55;
}
.mym-ai-section-body ul {
  padding-left: 16px;
  margin: 4px 0;
}
.mym-ai-section-body li { margin: 2px 0; }
.mym-ai-section-body strong { color: #e2d9f3; }

.mym-fan-ai-copy-btn {
  background: none;
  color: rgba(255,255,255,0.4);
  border: none;
  border-radius: 4px;
  padding: 2px 4px;
  line-height: 1;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}
.mym-fan-ai-copy-btn:hover {
  color: rgba(255,255,255,0.9);
  background: rgba(255,255,255,0.08);
}

.mym-ai-chevron {
  flex-shrink: 0;
  color: rgba(255,255,255,0.4);
  transition: transform 0.2s;
}
.mym-ai-chevron.open {
  transform: rotate(180deg);
}

.mym-fan-ai-body {
  overflow: hidden;
}
.mym-fan-ai-body.collapsed {
  display: none;
}
