/* ===== CLOUD PICKER — INTEGRATED IN NATIVE TABBAR ===== */

#mcp-custom-buttons {
  padding: 8px 16px 0;
  color: white;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: 8px;
}

/* ===== FLOATING VALIDATION BAR (for push media picker) ===== */

#mym-cloud-picker-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 999999;
  background: rgba(15, 15, 25, 0.98);
  backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 12px 20px;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  color: white;
}

.mcp-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.mcp-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 200px;
}

.mcp-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.mcp-logo {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #667eea, #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.mcp-status {
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.8);
  white-space: nowrap;
}

.mcp-count {
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.5);
  white-space: nowrap;
  transition: all 0.25s;
}

.mcp-count.mcp-count-active {
  background: rgba(72, 187, 120, 0.2);
  color: #68d391;
}

/* Buttons */
.mcp-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: none;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.mcp-btn-validate {
  padding: 6px 14px;
  background: #48bb78;
  color: white;
}

.mcp-btn-validate:hover:not(:disabled) {
  background: #38a169;
  box-shadow: 0 2px 12px rgba(72, 187, 120, 0.4);
}

.mcp-btn-validate:disabled {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.25);
  cursor: not-allowed;
}

.mcp-btn-cancel {
  padding: 6px 8px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.5);
}

.mcp-btn-cancel:hover {
  background: rgba(229, 62, 62, 0.15);
  color: #fc8181;
}

.mcp-btn-back {
  padding: 6px 8px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  border-radius: 8px;
  transition: all 0.2s;
  margin-right: 4px;
}

.mcp-btn-back:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

/* ===== MEDIA ITEMS ===== */

.mcp-selectable {
  position: relative !important;
  cursor: pointer !important;
  transition: transform 0.2s, box-shadow 0.2s !important;
}

.mcp-selectable:hover:not(.mcp-disabled) {
  transform: scale(1.02);
  z-index: 10 !important;
}

/* ── Badge (real DOM element, not pseudo) ── */
.mcp-badge {
  position: absolute !important;
  top: 8px !important;
  right: 8px !important;
  width: 26px !important;
  height: 26px !important;
  min-width: 26px !important;
  min-height: 26px !important;
  max-width: 26px !important;
  max-height: 26px !important;
  border-radius: 50% !important;
  border: 2.5px solid rgba(255, 255, 255, 0.7) !important;
  background: rgba(0, 0, 0, 0.3) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  pointer-events: none !important;
  z-index: 20 !important;
  transition: all 0.2s !important;
  box-sizing: border-box !important;
  flex-shrink: 0 !important;
  flex-grow: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  overflow: hidden !important;
}

.mcp-badge svg {
  opacity: 0;
  transition: opacity 0.2s;
  flex-shrink: 0;
}

/* Selected — green badge with checkmark */
.mcp-selected .mcp-badge {
  background: #48bb78 !important;
  border-color: white !important;
  box-shadow: 0 2px 8px rgba(72, 187, 120, 0.5) !important;
}

.mcp-selected .mcp-badge svg {
  opacity: 1;
}

/* Hover on selected — red badge (removable) */
.mcp-selected:hover .mcp-badge {
  background: #e53e3e !important;
  box-shadow: 0 2px 8px rgba(229, 62, 62, 0.5) !important;
}

/* Existing (locked) medias — green stays, no red on hover */
.mcp-existing {
  cursor: default !important;
}

.mcp-existing .mcp-badge {
  background: #48bb78 !important;
  border-color: white !important;
  box-shadow: 0 2px 8px rgba(72, 187, 120, 0.5) !important;
}

.mcp-existing:hover .mcp-badge {
  background: #48bb78 !important;
  box-shadow: 0 2px 8px rgba(72, 187, 120, 0.5) !important;
}

/* Disabled (max reached, not selected) */
.mcp-disabled {
  opacity: 0.3 !important;
  cursor: not-allowed !important;
  pointer-events: none !important;
}

.mcp-disabled .mcp-badge {
  display: none !important;
}

/* ===== NATIVE TABBAR OVERRIDE ===== */
.js-tabbar {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}
