/* Centralized Dropdown Styles */
/* Used by DropdownManager and all dropdown instances */

:root {
  --vs-dd-cursor-pointer: url("../../assets/cursors/pointer.svg") 14 7, pointer;
}

.vs-dd {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-width: 180px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.vs-dd-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  padding: 12px 16px !important;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(15, 23, 42, 0.6);
  color: #e5e7eb;
  cursor: var(--vs-dd-cursor-pointer) !important;
  font-size: 15px !important;
  min-height: 44px !important;
}

/* Selected value label inside the dropdown button (prevents text overflow) */
.vs-dd-label {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Video Creator specific dropdown styles - ensure they override inline styles */
#vc-resolution-btn,
#vc-resolution-btn-edit,
#vc-editor .vs-dd-btn,
#vc-edit-panel .vs-dd-btn,
#vc-inspector-content .vs-dd-btn,
#custom-modal .vs-dd-btn,
#custom-modal select,
.vc-inspector-field select,
.vc-inspector-field .vs-dd-btn {
  padding: 12px 16px !important;
  font-size: 15px !important;
  cursor: var(--vs-dd-cursor-pointer) !important;
  min-height: 44px !important;
}

/* Video Creator dropdown wrappers - ensure they respect container boundaries */
#vc-editor .vs-dd,
#vc-edit-panel .vs-dd,
#vc-inspector-content .vs-dd,
.vc-inspector-field .vs-dd,
.vc-inspector-row .vs-dd {
  max-width: 100% !important;
  min-width: 0 !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

/* Ensure dropdowns in rows don't overflow */
.vc-inspector-row .vs-dd {
  flex: 1;
  min-width: 0;
}

/* Video Creator dropdown options */
#vc-editor .vs-dd-opt,
#vc-edit-panel .vs-dd-opt,
#vc-inspector-content .vs-dd-opt,
#custom-modal .vs-dd-opt,
#custom-modal [role="option"],
.vc-inspector-field .vs-dd-opt {
  padding: 12px 16px !important;
  font-size: 15px !important;
}

.vs-dd-btn:hover {
  background: rgba(15, 23, 42, 0.8);
}

.vs-dd-btn * {
  cursor: inherit !important;
}

.vs-dd-btn:focus {
  outline: 2px solid #6366f1;
  outline-offset: 2px;
}

.vs-dd-caret {
  opacity: 0.7;
  font-size: 12px;
}

.vs-dd-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: auto;
  z-index: 20050;
  background: #0b1220;
  color: #e5e7eb;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  min-width: 100%;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  display: none;
  max-height: 240px;
  overflow: auto;
  overflow-x: hidden;
}

.vs-dd.open .vs-dd-menu {
  display: block;
}

.vs-dd-opt {
  padding: 12px 16px !important;
  cursor: pointer;
  white-space: nowrap;
  font-size: 15px !important;
}

.vs-dd-opt[aria-selected="true"] {
  background: #1f2937;
}

.vs-dd-opt:hover {
  background: #111827;
}

.vs-dd-opt-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.vs-dd-opt-avatar {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  object-fit: cover;
  flex: 0 0 auto;
  background: rgba(255, 255, 255, 0.08);
}

.vs-dd-opt-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vs-dd-opt-conn-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  flex: 0 0 auto;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35);
}

.vs-dd-opt-conn-dot.is-connected {
  background: #22c55e;
}

.vs-dd-opt-conn-dot.is-disconnected {
  background: #ef4444;
}

.vs-hide-native {
  position: absolute !important;
  opacity: 0 !important;
  pointer-events: none !important;
  width: 0 !important;
  height: 0 !important;
}

/* Standard dropdown styles */
.dropdown {
  position: relative;
}

.dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #94a3b8;
  text-decoration: none;
}

.dropdown-toggle:hover {
  color: #e5e7eb;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  padding: 8px;
  border-radius: 12px;
  background: rgba(11, 17, 32, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  display: none;
  flex-direction: column;
  z-index: 100;
}

.dropdown:hover .dropdown-menu,
.dropdown:focus-within .dropdown-menu {
  display: flex;
}

.dropdown.open .dropdown-menu {
  display: flex;
}

.dropdown-menu a {
  padding: 10px 12px;
  border-radius: 10px;
  color: #cbd5e1;
  white-space: nowrap;
}

.dropdown-menu a:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

/* AI dropdown specific styles */
#ai-category-dd .dropdown-menu,
#ai-duration-dd .dropdown-menu,
#ai-voice-dd .dropdown-menu {
  max-height: 260px;
  overflow: auto;
}

#ai-voice-dd .dropdown-menu {
  max-width: 320px;
}

#ai-voice-dd .dropdown-menu a {
  max-width: 320px;
  white-space: normal;
  word-break: break-word;
}

/* Project menu dropdown */
.proj-menu-dropdown {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 20020;
  display: none;
  flex-direction: column;
  min-width: 160px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(11, 17, 32, 0.95);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}

.proj-menu-dropdown.open {
  display: flex;
}

/* Homepage settings dropdown */
.home-proj-settings-dropdown {
  position: relative;
}

.home-proj-settings-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: auto;
  right: 0;
  z-index: 20025;
  display: none;
  flex-direction: column;
  min-width: 160px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(11, 17, 32, 0.95);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  overflow: hidden;
  backdrop-filter: blur(12px);
}

.home-proj-settings-dropdown.open .home-proj-settings-menu {
  display: flex;
}

.home-proj-view-option {
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  border: 0;
  color: #e5e7eb;
  text-align: left;
  padding: 10px 12px;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background 0.15s ease;
}

.home-proj-view-option:hover {
  background: rgba(255, 255, 255, 0.06);
}

.home-proj-view-option.active {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.home-proj-view-option .icon {
  flex-shrink: 0;
}

.home-proj-source-option {
  width: 100%;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  user-select: none;
}

.home-proj-source-option input {
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: #e5e7eb;
}

.home-proj--project {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
}

.home-proj--project iconify-icon {
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.25));
}

/* Flowboard specific dropdown styles */
#flowboard-section [data-vs-custom-select="1"] .vs-dd-btn {
  background: rgba(15, 23, 42, 0.9);
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.85);
  font-size: 14px;
  min-height: 40px;
}

#flowboard-section [data-vs-custom-select="1"] .vs-dd-btn:hover {
  background: rgba(15, 23, 42, 1);
  border-color: rgba(248, 250, 252, 0.35);
}

#flowboard-section [data-vs-custom-select="1"] .vs-dd-menu {
  background: rgba(15, 23, 42, 0.98);
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(18px);
}

#flowboard-section [data-vs-custom-select="1"] .vs-dd-opt {
  padding: 10px 14px !important;
  font-size: 14px;
}

#flowboard-section [data-vs-custom-select="1"] .vs-dd-opt[aria-selected="true"] {
  background: rgba(59, 130, 246, 0.25);
  color: #bfdbfe;
}

#flowboard-section [data-vs-custom-select="1"] .vs-dd-opt:hover {
  background: rgba(30, 64, 175, 0.9);
}













