/* Widget Container Base Styles */
.widget-error {
  padding: 12px;
  background: #fee;
  border-radius: 8px;
  border: 1px solid #fcc;
}

/* Menu Widget Styles */
.menu-widget {
  background: white;
  border-radius: 12px;
  border: 1px solid var(--main-border-color, #F3F3F3);
  overflow: hidden;
  margin: 8px 0;
  box-shadow: none;
}

.menu-widget-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 16px;
  border-bottom: 1px solid var(--main-border-color, #F3F3F3);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.menu-widget-header.diff-mode {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.menu-date {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}

.menu-date-icon {
  width: 20px;
  height: 20px;
  color: white;
  flex-shrink: 0;
}

.menu-date-text {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: white;
  text-transform: capitalize;
}

.menu-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.menu-action-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.menu-action-btn .btn-icon {
  width: 16px;
  height: 16px;
}

.edit-btn {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.edit-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

.save-btn {
  background: #10b981;
  color: white;
}

.save-btn:hover:not(:disabled) {
  background: #059669;
}

.save-btn:disabled {
  background: #9ca3af;
  cursor: not-allowed;
}

.save-btn.success {
  background: #10b981 !important;
  animation: successPulse 0.5s ease-out;
}

@keyframes successPulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

.cancel-btn {
  background: #ef4444;
  color: white;
}

.cancel-btn:hover:not(:disabled) {
  background: #dc2626;
}

.cancel-btn:disabled {
  background: #9ca3af;
  cursor: not-allowed;
}

.dismiss-btn {
  background: white;
  color: #059669;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.dismiss-btn:hover {
  background: rgba(255, 255, 255, 0.9);
}

.menu-content {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Menu Section */
.menu-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.menu-section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--main-border-color, #F3F3F3);
}

.menu-section-icon {
  width: 18px;
  height: 18px;
  color: #667eea;
  flex-shrink: 0;
}

.menu-section-title {
  font-size: 14px;
  font-weight: 600;
  color: #374151;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Soup of Day */
.menu-soup {
  font-size: 14px;
  color: #4b5563;
  padding: 12px;
  background: #f9fafb;
  border-radius: 8px;
  border: 1px solid var(--main-border-color, #F3F3F3);
}

/* Menu Items */
.menu-items {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.menu-item {
  padding: 14px;
  background: #f9fafb;
  border-radius: 8px;
  border: 1px solid var(--main-border-color, #F3F3F3);
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.menu-item:hover:not(.edit-mode) {
  background: #f3f4f6;
  border-color: #e5e7eb;
}

.menu-item.edit-mode {
  background: #fefce8;
  border-color: #fde047;
}

.menu-item-header {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.menu-item-number {
  font-size: 14px;
  font-weight: 700;
  color: #667eea;
  min-width: 20px;
  flex-shrink: 0;
}

.menu-item-name {
  font-size: 15px;
  font-weight: 600;
  color: #1f2937;
  line-height: 1.4;
}

.menu-item-description {
  font-size: 13px;
  color: #6b7280;
  line-height: 1.5;
  margin: 0;
  padding-left: 28px;
}

.menu-item-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-left: 28px;
  margin-top: 4px;
}

.menu-item-price {
  font-size: 15px;
  font-weight: 700;
  color: #667eea;
}

.menu-item-stock {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.menu-item-stock.in-stock {
  background: #d1fae5;
  color: #065f46;
}

.menu-item-stock.out-of-stock {
  background: #fee2e2;
  color: #991b1b;
}

/* Menu Notes */
.menu-notes {
  font-size: 13px;
  color: #6b7280;
  line-height: 1.6;
  padding: 12px;
  background: #fffbeb;
  border-radius: 8px;
  border: 1px solid #fef3c7;
  font-style: italic;
}

/* Responsive Design */
@media (max-width: 480px) {
  .menu-widget {
    border-radius: 8px;
  }

  .menu-widget-header {
    padding: 12px;
  }

  .menu-date-text {
    font-size: 14px;
  }

  .menu-content {
    padding: 12px;
    gap: 16px;
  }

  .menu-item {
    padding: 12px;
  }

  .menu-item-description {
    padding-left: 0;
  }

  .menu-item-footer {
    padding-left: 0;
    flex-wrap: wrap;
  }
}

/* Animation */
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.menu-widget {
  animation: slideIn 0.3s ease-out;
}

/* Error Banner */
.widget-error-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #fee2e2;
  border-bottom: 1px solid #fecaca;
  color: #991b1b;
  font-size: 13px;
  font-weight: 500;
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.error-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: #dc2626;
}

.widget-error-banner span {
  flex: 1;
}

.error-close {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: #991b1b;
  font-size: 20px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s ease;
}

.error-close:hover {
  background: rgba(220, 38, 38, 0.1);
}

/* Edit Mode Styles */
.menu-edit-input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  transition: all 0.2s ease;
}

.menu-edit-input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.menu-edit-textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 13px;
  font-family: inherit;
  resize: vertical;
  transition: all 0.2s ease;
}

.menu-edit-textarea:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.menu-item-edit-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.menu-item-name-input {
  flex: 1;
}

.item-controls {
  display: flex;
  gap: 4px;
}

.item-control-btn {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  background: white;
  cursor: pointer;
  font-size: 16px;
  font-weight: bold;
  transition: all 0.2s ease;
}

.item-control-btn:hover:not(:disabled) {
  background: #f3f4f6;
  border-color: #9ca3af;
}

.item-control-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.item-control-btn.remove-btn {
  color: #ef4444;
  font-size: 24px;
}

.item-control-btn.remove-btn:hover:not(:disabled) {
  background: #fee2e2;
  border-color: #ef4444;
}

.menu-item-edit-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #e5e7eb;
}

.price-edit {
  display: flex;
  align-items: center;
  gap: 8px;
}

.price-edit label {
  font-size: 13px;
  font-weight: 600;
  color: #6b7280;
}

.price-input {
  width: 100px;
}

.stock-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  cursor: pointer;
}

.stock-toggle input[type="checkbox"] {
  cursor: pointer;
}

.add-item-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px;
  margin-top: 12px;
  border: 2px dashed #d1d5db;
  border-radius: 8px;
  background: transparent;
  color: #667eea;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.add-item-btn:hover {
  border-color: #667eea;
  background: rgba(102, 126, 234, 0.05);
}

.add-item-btn .btn-icon {
  width: 18px;
  height: 18px;
}

/* Diff Mode Styles */
.old-value {
  text-decoration: line-through;
  color: #9ca3af;
  margin-right: 8px;
}

.change-arrow {
  color: #10b981;
  font-weight: bold;
  margin: 0 8px;
}

.new-value {
  color: #059669;
  font-weight: 600;
  background: #d1fae5;
  padding: 2px 6px;
  border-radius: 4px;
}

.change-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  color: #059669;
  background: #d1fae5;
  padding: 4px 8px;
  border-radius: 12px;
  margin-left: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.menu-item-name-change {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px;
  flex: 1;
}

.menu-item-price-change {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}