.akm-menu-container {
  margin: 20px 0;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: #fff;
}

.akm-menu-container h3 {
  margin: 0;
  padding: 15px 20px;
  background: #f7f7f7;
  border-bottom: 1px solid #ddd;
  font-size: 14px;
}

.akm-menu-items {
  padding: 10px;
  min-height: 80px;
  background: #fafafa;
}

.akm-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  margin: 3px 0;
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 4px;
  transition: all 0.2s ease;
  position: relative;
}

.akm-menu-item:hover {
  background: #f0f8ff;
  border-color: #0073aa;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.akm-drag-handle {
  cursor: move !important;
  color: #666 !important;
  font-size: 16px !important;
  width: 20px !important;
  text-align: center !important;
  user-select: none !important;
  padding: 5px !important;
  border-radius: 3px !important;
  display: inline-block !important;
  line-height: 1 !important;
}

.akm-drag-handle:hover {
  background: #e0e0e0 !important;
  color: #333 !important;
}

.akm-drag-handle.akm-disabled {
  cursor: not-allowed !important;
  color: #ccc !important;
  opacity: 0.5 !important;
}

.akm-drag-handle.akm-disabled:hover {
  background: transparent !important;
  color: #ccc !important;
}

.akm-menu-item .category-name {
  font-weight: 500;
  min-width: 200px;
  flex-shrink: 0;
}

.akm-custom-item .category-name {
  color: #0073aa;
}

.akm-category-item .category-name {
  color: #333;
}

.akm-category-item[data-level="1"] .category-name {
  color: #666;
  font-size: 14px;
}

.akm-category-item[data-level="2"] .category-name {
  color: #999;
  font-size: 13px;
}

.akm-custom-item input[type="text"] {
  padding: 6px 10px;
  border: 1px solid #ddd;
  border-radius: 3px;
  font-size: 13px;
}

.akm-custom-item input[name*="[title]"] {
  width: 180px;
}

.akm-custom-item input[name*="[url]"] {
  width: 360px;
}

.akm-custom-item input[type="text"]:focus,
.akm-custom-item input[type="url"]:focus {
  border-color: #0073aa;
  outline: none;
  box-shadow: 0 0 3px rgba(0,115,170,0.3);
}

.level-indicator {
  font-size: 11px;
  color: #999;
  background: #f0f0f0;
  padding: 2px 6px;
  border-radius: 10px;
  margin-left: auto;
}

.akm-placeholder {
  height: 60px;
  background: #e8f4fd;
  border: 2px dashed #0073aa;
  border-radius: 4px;
  margin: 3px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0073aa;
  font-size: 14px;
}

.akm-placeholder::before {
  content: "Hier ablegen...";
}

.akm-placeholder.akm-invalid-drop {
  background: #ffe6e6 !important;
  border-color: #dc3232 !important;
  color: #dc3232 !important;
}

.akm-placeholder.akm-invalid-drop::before {
  content: "❌ Ungültige Position";
}

.akm-placeholder.akm-invalid-block-drop {
  background: #ffcccc !important;
  border-color: #dc3232 !important;
  color: #dc3232 !important;
}

.akm-placeholder.akm-invalid-block-drop::before {
  content: "🚫 Hier kann kein Block abgelegt werden";
}

.ui-sortable-helper {
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  transform: rotate(2deg);
  z-index: 1000;
}

/* Block-Drop-Zonen Markierung */
.akm-valid-drop-block {
  border: 2px solid #4caf50 !important;
  background: #e8f5e8 !important;
  position: relative !important;
}

.akm-valid-drop-block::after {
  content: "✅ Gültige Block-Position" !important;
  position: absolute !important;
  top: -25px !important;
  left: 0 !important;
  background: #4caf50 !important;
  color: white !important;
  padding: 2px 8px !important;
  font-size: 11px !important;
  border-radius: 3px !important;
  z-index: 1000 !important;
}

.akm-invalid-drop-block {
  background: #ffe6e6 !important;
  border-color: #dc3232 !important;
  opacity: 0.3 !important;
  pointer-events: none !important;
}

/* Hierarchie-spezifische Styles */
.akm-category-item[data-level="0"] {
  border-left: 4px solid #0073aa;
}

.akm-category-item[data-level="1"] {
  border-left: 4px solid #46b450;
}

.akm-category-item[data-level="2"] {
  border-left: 4px solid #ffb900;
}

.akm-category-item[data-level="3"] {
  border-left: 4px solid #dc3232;
}

/* Visual Block Helper */
.akm-block-helper {
  border: 3px solid #0073aa !important;
  border-radius: 8px !important;
  padding: 15px !important;
  background: #e8f4fd !important;
  box-shadow: 0 8px 20px rgba(0,0,0,0.3) !important;
  max-width: 400px !important;
}

.akm-block-indicator {
  font-size: 12px !important;
  font-weight: bold !important;
  color: #0073aa !important;
  background: #fff !important;
  padding: 5px 10px !important;
  margin: 5px 0 10px 0 !important;
  border-radius: 15px !important;
  text-align: center !important;
  border: 1px solid #0073aa !important;
}

.akm-helper-child {
  background: #fff !important;
  border: 1px solid #ddd !important;
  border-radius: 4px !important;
  padding: 5px 8px !important;
  margin: 3px 0 !important;
  font-size: 11px !important;
  opacity: 0.8 !important;
}

.akm-more-indicator {
  font-size: 11px !important;
  color: #666 !important;
  font-style: italic !important;
  text-align: center !important;
  padding: 3px !important;
}

.akm-dragging-child {
  opacity: 0.3 !important;
  background: #f0f0f0 !important;
  pointer-events: none !important;
}

/* Visueller Hinweis für nicht-draggable Items */
.akm-category-item[data-level]:not([data-level="0"]) {
  background: #f8f8f8 !important;
  position: relative !important;
}

.akm-category-item[data-level]:not([data-level="0"]):hover {
  background: #f0f0f0 !important;
  border-color: #ddd !important;
  box-shadow: none !important;
}

.akm-not-sortable {
  pointer-events: none !important;
  user-select: none !important;
}

.akm-tree-child {
  border-left: 3px solid #0073aa !important;
  background: #e8f4fd !important;
  opacity: 0.8 !important;
}

.akm-tree-child::before {
  content: "📎" !important;
  position: absolute !important;
  left: 5px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  font-size: 12px !important;
}

.akm-add-section {
  padding: 15px 20px;
  border-top: 1px solid #ddd;
  background: #fafafa;
}

.akm-disabled {
  opacity: 0.6;
  pointer-events: none;
}

.akm-remove-custom {
  background: #dc3232;
  color: white;
  border: none;
  font-size: 12px;
  padding: 4px 8px;
}

.akm-remove-custom:hover {
  background: #a00;
}

/* Neue Parent-Item Styles */
.akm-parent-items {
  padding: 10px;
  min-height: 80px;
  background: #fafafa;
}

.akm-parent-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px;
  margin: 5px 0;
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 6px;
  transition: all 0.2s ease;
  position: relative;
}

.akm-parent-item:hover {
  background: #f0f8ff;
  border-color: #0073aa;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.akm-item-controls-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.akm-item-content {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}

.akm-item-icon {
  font-size: 16px;
  width: 20px;
  text-align: center;
}

.akm-item-title {
  font-weight: 500;
  min-width: 150px;
  color: #333;
}

.akm-child-count {
  font-size: 12px;
  color: #666;
  font-style: italic;
  margin-left: 5px;
}

.akm-item-controls-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* Toggle Switch Styles */
.akm-visibility-toggle {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 24px;
}

.akm-visibility-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.akm-toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: .4s;
  border-radius: 24px;
}

.akm-toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

.akm-visibility-toggle input:checked + .akm-toggle-slider {
  background-color: #0073aa;
}

.akm-visibility-toggle input:checked + .akm-toggle-slider:before {
  transform: translateX(26px);
}

/* Modal Styles */
.akm-modal {
  position: fixed;
  z-index: 100000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
}

.akm-modal-content {
  background-color: #fff;
  padding: 0;
  border-radius: 8px;
  width: 90%;
  max-width: 1000px;
  max-height: 95vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.akm-modal-header {
  padding: 20px;
  border-bottom: 1px solid #ddd;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f7f7f7;
  border-radius: 8px 8px 0 0;
}

.akm-modal-header h3 {
  margin: 0;
  font-size: 16px;
  color: #333;
}

.akm-modal-close {
  font-size: 24px;
  font-weight: bold;
  cursor: pointer;
  color: #999;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.akm-modal-close:hover {
  background: #f0f0f0;
  color: #333;
}

.akm-modal-body {
  padding: 20px;
  flex: 1;
  overflow-y: auto;
  max-height: calc(95vh - 160px);
}

.akm-modal-footer {
  padding: 15px 20px;
  border-top: 1px solid #ddd;
  background: #f9f9f9;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  border-radius: 0 0 8px 8px;
}

/* Children Styles */
.akm-children-header {
  margin-bottom: 20px;
}

.akm-children-header h4 {
  margin: 0 0 10px 0;
  color: #333;
  font-size: 16px;
}

.akm-children-header p {
  margin: 0;
  color: #666;
  font-size: 13px;
}

.akm-children-sortable {
  min-height: 50px;
}

.akm-child-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  margin: 3px 0;
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.akm-child-item:hover {
  background: #f8f8f8;
  border-color: #0073aa;
}

.akm-child-drag-handle {
  cursor: move;
  color: #666;
  font-size: 14px;
  width: 16px;
  text-align: center;
  user-select: none;
}

.akm-child-drag-handle:hover {
  color: #333;
}

.akm-child-content {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.akm-child-icon {
  font-size: 14px;
}

.akm-child-title {
  font-weight: 500;
  color: #333;
}

.akm-child-level {
  font-size: 11px;
  color: #999;
  background: #f0f0f0;
  padding: 2px 6px;
  border-radius: 10px;
  margin-left: auto;
}

.akm-child-controls {
  display: flex;
  align-items: center;
}

/* Child Toggle Switches */
.akm-child-visibility-toggle {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 20px;
}

.akm-child-visibility-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.akm-child-toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: .4s;
  border-radius: 20px;
}

.akm-child-toggle-slider:before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

.akm-child-visibility-toggle input:checked + .akm-child-toggle-slider {
  background-color: #0073aa;
}

.akm-child-visibility-toggle input:checked + .akm-child-toggle-slider:before {
  transform: translateX(20px);
}

/* Loading Styles */
.akm-loading {
  text-align: center;
  padding: 40px;
  color: #666;
  font-style: italic;
}

.error {
  color: #dc3232;
  background: #ffeaea;
  padding: 10px;
  border-radius: 4px;
  border: 1px solid #ffdddd;
}

/* Switch Styles für Mega Menu */
.akm-switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 28px;
}

.akm-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.akm-switch-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: .4s;
  border-radius: 28px;
}

.akm-switch-slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

.akm-switch input:checked + .akm-switch-slider {
  background-color: #0073aa;
}

.akm-switch input:checked + .akm-switch-slider:before {
  transform: translateX(32px);
}

/* Mega Menu Settings */
.akm-mega-menu-settings .form-table th {
  width: 200px;
  font-weight: 600;
}

.akm-mega-menu-settings .form-table td {
  padding: 15px 10px;
}

.akm-mega-menu-settings select {
  min-width: 200px;
}

.akm-mega-menu-settings input[type="color"] {
  width: 60px;
  height: 30px;
  border: 1px solid #ddd;
  border-radius: 3px;
  cursor: pointer;
}

/* Modal Tabs */
.akm-modal-tabs {
  margin-bottom: 0;
  border-bottom: 1px solid #ddd;
  padding: 0;
}

.akm-modal-tabs .nav-tab-wrapper {
  margin-bottom: 0;
  padding: 0;
}

.akm-modal-tabs .nav-tab {
  display: inline-block;
  margin-right: 10px;
  margin-bottom: -1px;
  position: relative;
  vertical-align: top;
}

.akm-modal-tabs .nav-tab-active {
  border-bottom: 1px solid #fff;
}

.akm-modal-tab-content {
  background: #fff;
  padding: 20px;
  min-height: 400px;
  max-height: 60vh;
  overflow-y: auto;
}

.akm-modal-tab-content h3 {
  margin-top: 0;
  padding-bottom: 10px;
  border-bottom: 1px solid #eee;
}

/* Modal Footer */
.akm-modal-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.akm-auto-save-indicator {
  color: #46b450;
  font-size: 13px;
}

/* Image Upload */
.akm-image-upload {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.akm-image-preview img {
  border: 1px solid #ddd;
  border-radius: 4px;
}

/* Submenu Indicators */
.akm-submenu-indicator {
  margin-left: 8px;
  font-size: 12px;
  color: #666;
  transition: all 0.3s ease;
  display: inline-block;
}

.akm-nav-link:hover .akm-submenu-indicator {
  color: #0073aa;
}

.akm-indicator-arrow-down .akm-submenu-indicator {
  transform: rotate(0deg);
}

.akm-indicator-arrow-right .akm-submenu-indicator {
  transform: rotate(-90deg);
}

.akm-indicator-plus .akm-submenu-indicator {
  font-weight: bold;
}

.akm-indicator-chevron-down .akm-submenu-indicator {
  font-size: 14px;
}

.akm-indicator-dots .akm-submenu-indicator {
  font-size: 16px;
  letter-spacing: 1px;
}

/* Mega Menu Frontend Output */
.akm-mega-menu-output {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  box-shadow: 0 5px 15px rgba(0,0,0,0.15);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 9999;
  padding: 30px;
}

.menu-item:hover .akm-mega-menu-output {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.akm-mega-grid {
  display: grid;
  gap: 30px;
}

.akm-mega-column {
  background: #f9f9f9;
  padding: 20px;
  border-radius: 8px;
}

.akm-mega-hero {
  grid-column: 1 / -1;
  text-align: center;
  margin-bottom: 20px;
}

.akm-mega-hero img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

.akm-mega-featured-products {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  margin-top: 20px;
}

.akm-mega-product {
  background: #fff;
  padding: 15px;
  border-radius: 6px;
  text-align: center;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.akm-mega-custom-content {
  grid-column: 1 / -1;
  margin: 20px 0;
}
