/* Config Actions Dropdown - Separated Mode */

/* 1. Toggle Button Style */
.config-actions-toggle {
  background: transparent;
  border: 1px solid transparent;
  font-size: 1.2rem;
  cursor: pointer;
  color: #94a3b8;
  padding: 4px 8px;
  border-radius: 4px;
  line-height: 1;
  transition: all 0.2s;
  
  /* Flexbox positioning in row 1 */
  margin-left: auto; /* Push to far right */
}

.config-actions-toggle:hover,
.config-actions-toggle.active {
  background-color: rgba(0, 0, 0, 0.05);
  color: #334155;
}

/* 2. Menu Container - The New Section */
/* This container is a direct flex child of config-item-compact */
.config-actions-menu-container {
  /* Force it to break into a new line */
  width: 100%;
  flex-basis: 100%; 
  order: 1000; /* Ensure it's at the very end */
  
  /* Hidden State */
  max-height: 0;
  opacity: 0;
  margin-top: 0;
  padding: 0;
  overflow: hidden;

  /* Animation */
  transition: 
    max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.2s ease-out,
    margin 0.2s ease,
    padding 0.2s ease;
    
  /* Styling */
  background: transparent;
  border-top: 1px dashed rgba(0, 0, 0, 0.08); /* Separator */
  margin-left: -4px; /* Slight alignment fix if needed */
  margin-right: -4px;
}

/* Closed State Helper */
.config-actions-menu-container:not(.open) {
  border-top-width: 0;
  visibility: hidden;
  transition: visibility 0s 0.3s, max-height 0.3s, margin 0.3s, border-width 0.1s;
}

/* 3. Open State */
.config-actions-menu-container.open {
  max-height: 500px;
  opacity: 1;
  margin-top: 8px; /* Gap from content */
  padding-top: 8px;
  visibility: visible;
  transition-delay: 0s;
}

/* Menu items/buttons inside */
.config-actions-menu-container button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: 10px 14px;
  
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(0,0,0,0.05);
  border-radius: 6px;
  margin-bottom: 6px;
  
  cursor: pointer;
  font-size: 0.9rem;
  color: #475569;
  transition: all 0.2s;
}

.config-actions-menu-container button:last-child {
  margin-bottom: 0;
}

.config-actions-menu-container button:hover {
  background: rgba(255, 255, 255, 0.95);
  color: #0bd;
  transform: translateX(4px);
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
  border-color: #e2e8f0;
}

.config-actions-menu-container button.danger {
  color: #ef4444;
  background: rgba(254, 226, 226, 0.3);
}

.config-actions-menu-container button.danger:hover {
  background: #fee2e2;
  border-color: #f87171;
}

/* Fix Parent Flex behavior */
.config-item-compact {
  flex-wrap: wrap !important;
  height: auto !important;
  align-items: center; /* Vertically align row 1 items */
  align-content: flex-start;
  padding-bottom: 8px;
}
