/* Buttons */

.header-controls {
  display: flex;
  gap: 8px;
  align-items: center;
}

.footer-controls {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.input-modern {
  padding: 10px 14px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  font-family: system-ui, sans-serif;
  background: var(--bg-card);
  color: var(--text);
  transition: all 0.3s ease;
  flex: 1;
  max-width: 300px;
}

.input-modern::placeholder {
  color: var(--text-soft);
}

.input-modern:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
  background: #fafafa;
}

.btn-primary {
  padding: 10px 16px;
  background: linear-gradient(135deg, var(--accent), #0056b3);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3);
  transition: all 0.2s ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 122, 255, 0.4);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(0, 122, 255, 0.3);
}

.btn-secondary {
  padding: 10px 16px;
  background: linear-gradient(135deg, #28a745, #20c997);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(40, 167, 69, 0.4);
}

.btn-secondary:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}

.btn-danger {
  padding: 10px 16px;
  background: linear-gradient(135deg, #ff6b6b, #ff4d4d);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(255, 75, 75, 0.3);
  transition: all 0.2s ease;
  width: 100%;
}

.btn-danger:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(255, 75, 75, 0.4);
}

.btn-danger:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(255, 75, 75, 0.3);
}

/* Tabs */

.tab {
  padding: 6px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: grab;
  white-space: nowrap;
  display: flex;
  align-items: center;
}

.tab.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.tab-content {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.tab-name {
  flex: 1;
}

.tab-copy {
  background: none;
  border: none;
  color: #28a745;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  padding: 0;
  margin: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 3px;
  transition: all 0.2s ease;
}

.tab-copy:hover {
  background: rgba(40, 167, 69, 0.1);
  color: #218838;
}

.tab.active .tab-copy {
  color: #32cd32;
}

.tab.active .tab-copy:hover {
  background: rgba(50, 205, 50, 0.2);
}

.tab-delete {
  background: none;
  border: none;
  color: #d00;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  padding: 0;
  margin: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 3px;
  transition: all 0.2s ease;
}

.tab-delete:hover {
  background: rgba(208, 0, 0, 0.1);
  color: #c00;
}

.tab.active .tab-delete {
  color: #ff6b6b;
}

.tab.active .tab-delete:hover {
  background: rgba(255, 107, 107, 0.2);
}

.tab.dragging {
  opacity: 0.5;
  cursor: grabbing;
}

.tab.drag-over {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(0, 122, 255, 0.3);
}

/* Items */

.item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px;
  background: #fafafa;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 6px;
  cursor: grab;
  transition: all 0.2s ease;
}

.item:hover {
  background: #f5f5f5;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.item.done {
  opacity: 0.6;
}

.item.done .item-label {
  text-decoration: line-through;
  color: #999;
}

.item.dragging {
  opacity: 0.5;
  cursor: grabbing;
}

.item.drag-over {
  background: #e8f4f8;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(0, 122, 255, 0.1);
}

.item-checkbox {
  width: 18px;
  height: 18px;
  cursor: pointer;
  flex-shrink: 0;
}

.item-label {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 14px;
  color: var(--text);
  padding: 2px;
  font-family: system-ui, sans-serif;
  min-width: 0;
}

.item-label:focus {
  outline: 1px solid var(--accent);
  background: #fff;
  padding: 2px 4px;
}

.item-qty {
  width: 50px;
  border: 1px solid var(--border);
  padding: 4px 6px;
  border-radius: var(--radius);
  background: #fff;
  font-size: 12px;
  text-align: center;
  font-family: system-ui, sans-serif;
}

.item-qty:focus {
  outline: 1px solid var(--accent);
  background: #fff;
}

.item-qty-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
  font-size: 14px;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.item-qty-btn:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.item-qty-btn:active {
  transform: scale(0.95);
}

.item-delete {
  background: none;
  border: none;
  color: #d00;
  cursor: pointer;
  font-size: 18px;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 3px;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.item-delete:hover {
  background: rgba(208, 0, 0, 0.1);
  color: #c00;
}

.empty-list {
  text-align: center;
  color: #999;
  font-style: italic;
  padding: 32px 12px;
  font-size: 14px;
}

/* Einkaufszettel Styling */

.items-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #ffffff;
  border: 1px solid #ddd;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  position: relative;
}

.items-header {
  padding: 12px;
  border-bottom: 1px solid #ddd;
  position: relative;
  z-index: 1;
  background: #ffffff;
}

.items-header h2 {
  font-size: 18px;
  font-weight: 600;
  margin: 0;
  color: #333;
}

.items-input-container {
  display: flex;
  gap: 6px;
  padding: 12px;
  border-bottom: 1px solid #ddd;
  position: relative;
  z-index: 1;
  background: #ffffff;
}

.items-input-container .input-modern {
  flex: 1;
  max-width: none;
  border: 1px solid #ddd;
  background: #fafafa;
  font-size: 13px;
}

.items-input-container .btn-primary {
  padding: 8px 12px;
  font-size: 12px;
  white-space: nowrap;
}

.items-list {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.items-list p {
  text-align: center;
  color: #999;
  font-style: italic;
  margin-top: auto;
  margin-bottom: auto;
  font-size: 14px;
}
