/**
 * Shared DC Preset Dropdown Styles
 * Used by Challenge Builder and GM Sidebar PCs tab
 */

/* Dropdown Container */
.preset-dropdown,
.dc-preset-dropdown,
.storyframe-dc-preset-popup {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 4px;
  background: var(--sf-surface-secondary, rgba(40, 45, 55, 0.95));
  border: 1px solid var(--sf-border-primary, rgba(94, 129, 172, 0.25));
  border-radius: 8px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
  z-index: 300000;
  width: 220px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* Tabs Header */
.preset-dropdown .dc-tabs-header,
.dc-preset-dropdown .dc-tabs-header {
  display: flex;
  gap: 4px;
  padding: 6px;
  background: rgba(0, 0, 0, 0.3);
  border-bottom: 1px solid rgba(94, 129, 172, 0.3);
  border-radius: 8px 8px 0 0;
}

/* Tabs Body */
.preset-dropdown .dc-tabs-body,
.dc-preset-dropdown .dc-tabs-body {
  padding: 8px;
  max-height: 100px;
  overflow-y: auto;
}

.preset-dropdown .dc-tab-btn,
.dc-preset-dropdown .dc-tab-btn {
  flex: 1;
  padding: 8px 12px;
  background: rgba(94, 129, 172, 0.1);
  border: 1px solid rgba(94, 129, 172, 0.2);
  border-radius: 5px;
  cursor: pointer;
  color: rgba(94, 129, 172, 0.8);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: all 0.2s;
  white-space: nowrap;
}

.preset-dropdown .dc-tab-btn:hover,
.dc-preset-dropdown .dc-tab-btn:hover {
  background: rgba(94, 129, 172, 0.25);
  border-color: rgba(94, 129, 172, 0.5);
  color: #6b91c9;
}

.preset-dropdown .dc-tab-btn.active,
.dc-preset-dropdown .dc-tab-btn.active {
  background: rgba(94, 129, 172, 0.35);
  border-color: rgba(94, 129, 172, 0.6);
  color: #81a1ff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

/* Tabs Body */
.preset-dropdown .dc-tabs-body,
.dc-preset-dropdown .dc-tabs-body {
  padding: 12px;
  max-height: 280px;
  overflow-y: auto;
}

.preset-dropdown .dc-tab-content,
.dc-preset-dropdown .dc-tab-content {
  display: none;
  gap: 6px;
  flex-wrap: wrap;
}

.preset-dropdown .dc-tab-content.active,
.dc-preset-dropdown .dc-tab-content.active {
  display: flex;
}

/* Preset Options */
.preset-dropdown .preset-option-wrapper,
.dc-preset-dropdown .preset-option-wrapper {
  display: flex;
  align-items: center;
  gap: 4px;
  position: relative;
  width: 100%;
}

.preset-dropdown .preset-option,
.dc-preset-dropdown .preset-option {
  padding: 10px 14px;
  background: rgba(94, 129, 172, 0.25);
  border: 1px solid rgba(94, 129, 172, 0.4);
  border-radius: 6px;
  cursor: pointer;
  color: #7fa3d1;
  font-weight: 600;
  font-size: 13px;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-height: 38px;
}

.preset-dropdown .preset-option:hover,
.dc-preset-dropdown .preset-option:hover {
  background: rgba(94, 129, 172, 0.45);
  border-color: rgba(94, 129, 172, 0.6);
  color: #a0c0f0;
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
}

.preset-dropdown .preset-option .preset-dc,
.dc-preset-dropdown .preset-option .preset-dc {
  font-weight: 700;
  font-size: 16px;
  color: #b5d5ff;
}

.preset-dropdown .preset-option .preset-label,
.dc-preset-dropdown .preset-option .preset-label {
  font-size: 11px;
  font-weight: 600;
  opacity: 0.9;
  text-transform: capitalize;
}

.preset-dropdown .preset-remove-btn,
.dc-preset-dropdown .preset-remove-btn {
  padding: 4px 6px;
  background: rgba(191, 97, 106, 0.2);
  border: 1px solid rgba(191, 97, 106, 0.3);
  border-radius: 3px;
  cursor: pointer;
  color: #bf616a;
  font-size: 10px;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.7;
}

.preset-dropdown .preset-option-wrapper:hover .preset-remove-btn,
.dc-preset-dropdown .preset-option-wrapper:hover .preset-remove-btn {
  opacity: 1;
}

.preset-dropdown .preset-remove-btn:hover,
.dc-preset-dropdown .preset-remove-btn:hover {
  background: rgba(191, 97, 106, 0.4);
  transform: scale(1.1);
}

/* Add Preset Form */
.preset-dropdown .add-preset-form,
.dc-preset-dropdown .add-preset-form {
  width: 100%;
  display: flex;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid rgba(94, 129, 172, 0.3);
}

.preset-dropdown .preset-dc-input-new,
.dc-preset-dropdown .preset-dc-input-new {
  flex: 1;
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(94, 129, 172, 0.4);
  border-radius: 5px;
  color: #e8e8e8;
  font-size: 13px;
  text-align: center;
  font-weight: 600;
}

.preset-dropdown .preset-dc-input-new:focus,
.dc-preset-dropdown .preset-dc-input-new:focus {
  border-color: rgba(94, 129, 172, 0.7);
  outline: none;
  box-shadow: 0 0 0 3px rgba(94, 129, 172, 0.2);
}

.preset-dropdown .preset-add-btn,
.dc-preset-dropdown .preset-add-btn {
  padding: 10px 16px;
  background: rgba(163, 190, 140, 0.35);
  border: 1px solid rgba(163, 190, 140, 0.6);
  border-radius: 5px;
  cursor: pointer;
  color: #b8d5a0;
  font-size: 13px;
  font-weight: 700;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.preset-dropdown .preset-add-btn:hover,
.dc-preset-dropdown .preset-add-btn:hover {
  background: rgba(163, 190, 140, 0.5);
  border-color: rgba(163, 190, 140, 0.8);
  color: #d0f0b8;
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
}

/* No Presets Message */
.preset-dropdown .no-presets,
.dc-preset-dropdown .no-presets {
  width: 100%;
  padding: 12px 16px;
  color: rgba(200, 200, 200, 0.7);
  font-size: 12px;
  font-style: italic;
  text-align: center;
}

/* Scrollbar for tabs body */
.preset-dropdown .dc-tabs-body::-webkit-scrollbar,
.dc-preset-dropdown .dc-tabs-body::-webkit-scrollbar {
  width: 6px;
}

.preset-dropdown .dc-tabs-body::-webkit-scrollbar-track,
.dc-preset-dropdown .dc-tabs-body::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 3px;
}

.preset-dropdown .dc-tabs-body::-webkit-scrollbar-thumb,
.dc-preset-dropdown .dc-tabs-body::-webkit-scrollbar-thumb {
  background: rgba(94, 129, 172, 0.4);
  border-radius: 3px;
}

.preset-dropdown .dc-tabs-body::-webkit-scrollbar-thumb:hover,
.dc-preset-dropdown .dc-tabs-body::-webkit-scrollbar-thumb:hover {
  background: rgba(94, 129, 172, 0.6);
}
